diff --git a/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java b/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java index 00b4ea232..be722b94a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java +++ b/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java @@ -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. *