Browse Source

whitespace changes only

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275148 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
1c2810aaff
2 changed files with 25 additions and 27 deletions
  1. +8
    -8
      src/main/org/apache/tools/ant/taskdefs/Redirector.java
  2. +17
    -19
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java

+ 8
- 8
src/main/org/apache/tools/ant/taskdefs/Redirector.java View File

@@ -269,10 +269,10 @@ public class Redirector {
errorStream = new LogOutputStream(managingTask, Project.MSG_WARN); errorStream = new LogOutputStream(managingTask, Project.MSG_WARN);
} else { } else {
if (out != null) { if (out != null) {
outputStream
= new DelayedFileOutputStream(out, append);
managingTask.log("Output redirected to " + out,
Project.MSG_VERBOSE);
outputStream
= new DelayedFileOutputStream(out, append);
managingTask.log("Output redirected to " + out,
Project.MSG_VERBOSE);
} }


if (outputProperty != null) { if (outputProperty != null) {
@@ -296,10 +296,10 @@ public class Redirector {
} }


if (error != null) { if (error != null) {
errorStream
= new DelayedFileOutputStream(error, append);
managingTask.log("Error redirected to " + error,
Project.MSG_VERBOSE);
errorStream
= new DelayedFileOutputStream(error, append);
managingTask.log("Error redirected to " + error,
Project.MSG_VERBOSE);
} }


if (errorProperty != null) { if (errorProperty != null) {


+ 17
- 19
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java View File

@@ -206,12 +206,10 @@ public class Scp extends SSHBase {
} }
} }
if (!list.isEmpty()) { if (!list.isEmpty()) {
session = openSession();
ScpToMessage message = new ScpToMessage(session,
list,
file);
message.setLogListener(this);
message.execute();
session = openSession();
ScpToMessage message = new ScpToMessage(session, list, file);
message.setLogListener(this);
message.execute();
} }
} finally { } finally {
if (session != null) { if (session != null) {
@@ -281,21 +279,21 @@ public class Scp extends SSHBase {
Directory root = new Directory(scanner.getBasedir()); Directory root = new Directory(scanner.getBasedir());
String[] files = scanner.getIncludedFiles(); String[] files = scanner.getIncludedFiles();
if (files.length != 0) { if (files.length != 0) {
for (int j = 0; j < files.length; j++) {
String[] path = Directory.getPath(files[j]);
Directory current = root;
File currentParent = scanner.getBasedir();
for (int i = 0; i < path.length; i++) {
File file = new File(currentParent, path[i]);
if (file.isDirectory()) {
current.addDirectory(new Directory(file));
current = current.getChild(file);
currentParent = current.getDirectory();
} else if (file.isFile()) {
current.addFile(file);
for (int j = 0; j < files.length; j++) {
String[] path = Directory.getPath(files[j]);
Directory current = root;
File currentParent = scanner.getBasedir();
for (int i = 0; i < path.length; i++) {
File file = new File(currentParent, path[i]);
if (file.isDirectory()) {
current.addDirectory(new Directory(file));
current = current.getChild(file);
currentParent = current.getDirectory();
} else if (file.isFile()) {
current.addFile(file);
}
} }
} }
}
} else { } else {
// skip // skip
root = null; root = null;


Loading…
Cancel
Save