git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@582162 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -527,7 +527,7 @@ public class Rmic extends MatchingTask { | |||||
| String path = classname.replace('.', File.separatorChar) + ".class"; | String path = classname.replace('.', File.separatorChar) + ".class"; | ||||
| File f = new File(baseDir, path); | File f = new File(baseDir, path); | ||||
| if (f.isFile()) { | if (f.isFile()) { | ||||
| scanDir(baseDir, new String[] { path }, adapter.getMapper()); | |||||
| scanDir(baseDir, new String[] {path}, adapter.getMapper()); | |||||
| } else { | } else { | ||||
| // Does not exist, so checking whether it is up to date makes no sense. | // 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. | // Compilation will fail later anyway, but tests expect a certain output. | ||||
| @@ -773,7 +773,8 @@ public class Depend extends MatchingTask { | |||||
| * Find the source file for a given class | * Find the source file for a given class | ||||
| * | * | ||||
| * @param classname the classname in slash format. | * @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) { | private File findSourceFile(String classname, File sourceFileKnownToExist) { | ||||
| String sourceFilename; | String sourceFilename; | ||||
| @@ -826,7 +827,8 @@ public class Depend extends MatchingTask { | |||||
| file.getPath().length() - ".class".length()); | file.getPath().length() - ".class".length()); | ||||
| info.className | info.className | ||||
| = ClassFileUtils.convertSlashName(relativeName); | = ClassFileUtils.convertSlashName(relativeName); | ||||
| info.sourceFile = sourceFileKnownToExist = findSourceFile(relativeName, sourceFileKnownToExist); | |||||
| info.sourceFile = sourceFileKnownToExist = findSourceFile( | |||||
| relativeName, sourceFileKnownToExist); | |||||
| classFileList.addElement(info); | classFileList.addElement(info); | ||||
| } else { | } else { | ||||
| addClassFiles(classFileList, file, root); | addClassFiles(classFileList, file, root); | ||||
| @@ -150,16 +150,16 @@ public class SSHExec extends SSHBase { | |||||
| if (command == null && commandResource == null) { | if (command == null && commandResource == null) { | ||||
| throw new BuildException("Command or commandResource is required."); | throw new BuildException("Command or commandResource is required."); | ||||
| } | } | ||||
| Session session = null; | Session session = null; | ||||
| try { | try { | ||||
| session = openSession(); | session = openSession(); | ||||
| /* called once */ | /* called once */ | ||||
| if (command != null) { | if (command != null) { | ||||
| log("cmd : " + command, Project.MSG_INFO); | log("cmd : " + command, Project.MSG_INFO); | ||||
| ByteArrayOutputStream out = executeCommand(session, command); | ByteArrayOutputStream out = executeCommand(session, command); | ||||
| if(outputProperty != null) { | |||||
| if (outputProperty != null) { | |||||
| //#bugzilla 43437 | //#bugzilla 43437 | ||||
| getProject().setNewProperty(outputProperty, command + " : " + out); | getProject().setNewProperty(outputProperty, command + " : " + out); | ||||
| } | } | ||||
| @@ -174,7 +174,7 @@ public class SSHExec extends SSHBase { | |||||
| ByteArrayOutputStream out = executeCommand(session, cmd); | ByteArrayOutputStream out = executeCommand(session, cmd); | ||||
| output += cmd + " : " + out + "\n"; | output += cmd + " : " + out + "\n"; | ||||
| } | } | ||||
| if(outputProperty != null) { | |||||
| if (outputProperty != null) { | |||||
| //#bugzilla 43437 | //#bugzilla 43437 | ||||
| getProject().setNewProperty(outputProperty, output); | getProject().setNewProperty(outputProperty, output); | ||||
| } | } | ||||
| @@ -183,7 +183,7 @@ public class SSHExec extends SSHBase { | |||||
| throw new BuildException(e); | throw new BuildException(e); | ||||
| } | } | ||||
| } | } | ||||
| } catch(JSchException e) { | |||||
| } catch (JSchException e) { | |||||
| throw new BuildException(e); | throw new BuildException(e); | ||||
| } finally { | } finally { | ||||
| if (session != null && session.isConnected()) { | 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(); | ByteArrayOutputStream out = new ByteArrayOutputStream(); | ||||
| TeeOutputStream tee = new TeeOutputStream(out, new KeepAliveOutputStream(System.out)); | TeeOutputStream tee = new TeeOutputStream(out, new KeepAliveOutputStream(System.out)); | ||||
| @@ -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.Restrict; | ||||
| import org.apache.tools.ant.types.resources.Resources; | import org.apache.tools.ant.types.resources.Resources; | ||||
| import org.apache.tools.ant.types.resources.Touchable; | 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.Not; | ||||
| import org.apache.tools.ant.types.resources.selectors.Date; | 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.Exists; | ||||
| import org.apache.tools.ant.types.resources.selectors.ResourceSelector; | import org.apache.tools.ant.types.resources.selectors.ResourceSelector; | ||||
| import org.apache.tools.ant.types.selectors.SelectorUtils; | import org.apache.tools.ant.types.selectors.SelectorUtils; | ||||