From 7f8f17e8b86c79fc802e13cd8bc9947eddd3a090 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Sat, 30 Dec 2006 23:54:49 +0000 Subject: [PATCH] checkstyle: reduce size of method git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@491348 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/taskdefs/ExecuteOn.java | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) 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. *