You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2006/12/31 00:54:50 UTC
svn commit: r491348 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
Author: peterreilly
Date: Sat Dec 30 15:54:49 2006
New Revision: 491348
URL: http://svn.apache.org/viewvc?view=rev&rev=491348
Log:
checkstyle: reduce size of method
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java?view=diff&rev=491348&r1=491347&r2=491348
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java Sat Dec 30 15:54:49 2006
@@ -383,15 +383,7 @@
}
}
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) {
@@ -500,6 +492,25 @@
redirector.setAppendProperties(false);
redirector.setProperties();
}
+ }
+
+ /**
+ * 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);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org