This is an automated email from the ASF dual-hosted git repository. bodewig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ant.git
commit f830c705d543e06d8b871b927708ef11230db4be Author: Stefan Bodewig <bode...@apache.org> AuthorDate: Thu Mar 2 12:34:08 2023 +0100 whitespace --- src/main/org/apache/tools/ant/taskdefs/Sync.java | 12 ++++++------ src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java | 9 +++++---- .../apache/tools/ant/taskdefs/optional/sound/SoundTask.java | 10 +++++----- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Sync.java b/src/main/org/apache/tools/ant/taskdefs/Sync.java index 34bed4400..a009fe691 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Sync.java +++ b/src/main/org/apache/tools/ant/taskdefs/Sync.java @@ -293,14 +293,14 @@ public class Sync extends Task { if (dir.isDirectory()) { File[] children = dir.listFiles(); if (children != null) { - for (File file : children) { - // Test here again to avoid method call for non-directories! - if (file.isDirectory()) { - removedCount += removeEmptyDirectories(file, true, - preservedEmptyDirectories); + for (File file : children) { + // Test here again to avoid method call for non-directories! + if (file.isDirectory()) { + removedCount += removeEmptyDirectories(file, true, + preservedEmptyDirectories); + } } } - } if (children == null || children.length > 0) { // This directory may have become empty... // We need to re-query its children list! diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java index 78c556bb0..829ab0006 100644 --- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java +++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java @@ -430,10 +430,11 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { for (String dir : scanner.getIncludedDirectories()) { String[] elements = new File(baseDir, dir).list(); if (elements != null) { - for (String element : new File(baseDir, dir).list()) { - process(baseDir, dir + File.separator + element, destDir, - styleResource); - } + for (String element : new File(baseDir, dir).list()) { + process(baseDir, + dir + File.separator + element, + destDir, styleResource); + } } } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java index 1f0363318..67e568922 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java @@ -150,13 +150,13 @@ public class SoundTask extends Task { Vector<File> files = new Vector<>(); String[] fileNames = source.list(); if (fileNames != null) { - for (String file : fileNames) { - File f = new File(source, file); - if (f.isFile()) { - files.addElement(f); + for (String file : fileNames) { + File f = new File(source, file); + if (f.isFile()) { + files.addElement(f); + } } } - } if (files.size() < 1) { throw new BuildException("No files found in directory " + source); }