Browse Source

checkstyle: reduce size of method

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@491348 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
7f8f17e8b8
1 changed files with 20 additions and 9 deletions
  1. +20
    -9
      src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java

+ 20
- 9
src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -383,15 +383,7 @@ public class ExecuteOn extends ExecTask {
}
}
if (fileNames.size() == 0 && skipEmpty) {
int includedCount
= ((!FileDirBoth.DIR.equals(currentType))
? ds.getIncludedFilesCount() : 0)
+ ((!FileDirBoth.FILE.equals(currentType))
? ds.getIncludedDirsCount() : 0);

log("Skipping fileset for directory " + base + ". It is "
+ ((includedCount > 0) ? "up to date." : "empty."),
Project.MSG_INFO);
logSkippingFileset(currentType, ds, base);
continue;
}
if (!parallel) {
@@ -502,6 +494,25 @@ public class ExecuteOn extends ExecTask {
}
}

/**
* log a message for skipping a fileset.
* @param currentType the current type.
* @param ds the directory scanner.
* @param base the dir base
*/
private void logSkippingFileset(
String currentType, DirectoryScanner ds, File base) {
int includedCount
= ((!FileDirBoth.DIR.equals(currentType))
? ds.getIncludedFilesCount() : 0)
+ ((!FileDirBoth.FILE.equals(currentType))
? ds.getIncludedDirsCount() : 0);

log("Skipping fileset for directory " + base + ". It is "
+ ((includedCount > 0) ? "up to date." : "empty."),
Project.MSG_INFO);
}

/**
* Construct the command line for parallel execution.
*


Loading…
Cancel
Save