Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@582162 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
3a9aafdba7
4 changed files with 13 additions and 13 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Rmic.java
  2. +4
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  3. +8
    -7
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
  4. +0
    -3
      src/main/org/apache/tools/ant/util/ResourceUtils.java

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Rmic.java View File

@@ -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.


+ 4
- 2
src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java View File

@@ -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);


+ 8
- 7
src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java View File

@@ -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));



+ 0
- 3
src/main/org/apache/tools/ant/util/ResourceUtils.java View File

@@ -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;


Loading…
Cancel
Save