diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index 471916306..830b52517 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -527,7 +527,7 @@ public class Rmic extends MatchingTask { String path = classname.replace('.', File.separatorChar) + ".class"; File f = new File(baseDir, path); if (f.isFile()) { - scanDir(baseDir, new String[] { path }, adapter.getMapper()); + scanDir(baseDir, new String[] {path}, adapter.getMapper()); } else { // Does not exist, so checking whether it is up to date makes no sense. // Compilation will fail later anyway, but tests expect a certain output. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java index 56b7c21aa..9bb866302 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java @@ -773,7 +773,8 @@ public class Depend extends MatchingTask { * Find the source file for a given class * * @param classname the classname in slash format. - * @param sourceFileKnownToExist if not null, a file already known to exist (saves call to .exists()) + * @param sourceFileKnownToExist if not null, a file already known to exist + * (saves call to .exists()) */ private File findSourceFile(String classname, File sourceFileKnownToExist) { String sourceFilename; @@ -826,7 +827,8 @@ public class Depend extends MatchingTask { file.getPath().length() - ".class".length()); info.className = ClassFileUtils.convertSlashName(relativeName); - info.sourceFile = sourceFileKnownToExist = findSourceFile(relativeName, sourceFileKnownToExist); + info.sourceFile = sourceFileKnownToExist = findSourceFile( + relativeName, sourceFileKnownToExist); classFileList.addElement(info); } else { addClassFiles(classFileList, file, root); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java index a4af4da7b..163153953 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java @@ -150,16 +150,16 @@ public class SSHExec extends SSHBase { if (command == null && commandResource == null) { throw new BuildException("Command or commandResource is required."); } - + Session session = null; - + try { session = openSession(); /* called once */ if (command != null) { log("cmd : " + command, Project.MSG_INFO); ByteArrayOutputStream out = executeCommand(session, command); - if(outputProperty != null) { + if (outputProperty != null) { //#bugzilla 43437 getProject().setNewProperty(outputProperty, command + " : " + out); } @@ -174,7 +174,7 @@ public class SSHExec extends SSHBase { ByteArrayOutputStream out = executeCommand(session, cmd); output += cmd + " : " + out + "\n"; } - if(outputProperty != null) { + if (outputProperty != null) { //#bugzilla 43437 getProject().setNewProperty(outputProperty, output); } @@ -183,7 +183,7 @@ public class SSHExec extends SSHBase { throw new BuildException(e); } } - } catch(JSchException e) { + } catch (JSchException e) { throw new BuildException(e); } finally { if (session != null && session.isConnected()) { @@ -191,8 +191,9 @@ public class SSHExec extends SSHBase { } } } - - private ByteArrayOutputStream executeCommand(Session session, String cmd) throws BuildException { + + private ByteArrayOutputStream executeCommand(Session session, String cmd) + throws BuildException { ByteArrayOutputStream out = new ByteArrayOutputStream(); TeeOutputStream tee = new TeeOutputStream(out, new KeepAliveOutputStream(System.out)); diff --git a/src/main/org/apache/tools/ant/util/ResourceUtils.java b/src/main/org/apache/tools/ant/util/ResourceUtils.java index 860262e36..a596da2eb 100644 --- a/src/main/org/apache/tools/ant/util/ResourceUtils.java +++ b/src/main/org/apache/tools/ant/util/ResourceUtils.java @@ -43,11 +43,8 @@ import org.apache.tools.ant.types.resources.Union; import org.apache.tools.ant.types.resources.Restrict; import org.apache.tools.ant.types.resources.Resources; import org.apache.tools.ant.types.resources.Touchable; -import org.apache.tools.ant.types.resources.selectors.Or; -import org.apache.tools.ant.types.resources.selectors.And; import org.apache.tools.ant.types.resources.selectors.Not; import org.apache.tools.ant.types.resources.selectors.Date; -import org.apache.tools.ant.types.resources.selectors.Type; import org.apache.tools.ant.types.resources.selectors.Exists; import org.apache.tools.ant.types.resources.selectors.ResourceSelector; import org.apache.tools.ant.types.selectors.SelectorUtils;