Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA6D419A65 for ; Tue, 29 Mar 2016 09:04:29 +0000 (UTC) Received: (qmail 73260 invoked by uid 500); 29 Mar 2016 09:04:29 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 73145 invoked by uid 500); 29 Mar 2016 09:04:29 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 72740 invoked by uid 99); 29 Mar 2016 09:04:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2016 09:04:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 45C52E009E; Tue, 29 Mar 2016 09:04:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bodewig@apache.org To: notifications@ant.apache.org Date: Tue, 29 Mar 2016 09:04:30 -0000 Message-Id: <18001061f79a4a26addb20149c45e626@git.apache.org> In-Reply-To: <247faaf2fa7640d7b8a20e053e831693@git.apache.org> References: <247faaf2fa7640d7b8a20e053e831693@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] ant git commit: whitespace whitespace Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/311138d0 Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/311138d0 Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/311138d0 Branch: refs/heads/master Commit: 311138d0aa08502d6bd1481c2488b4b9902874b5 Parents: 0906b0a Author: Stefan Bodewig Authored: Tue Mar 29 11:03:02 2016 +0200 Committer: Stefan Bodewig Committed: Tue Mar 29 11:03:02 2016 +0200 ---------------------------------------------------------------------- .../ant/taskdefs/optional/XMLValidateTask.java | 54 ++++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/311138d0/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java index 05c043d..26b49a2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java @@ -287,42 +287,40 @@ public class XMLValidateTask extends Task { */ public void execute() throws BuildException { try { - int fileProcessed = 0; - if (file == null && (filesets.size() == 0)) { - throw new BuildException( - "Specify at least one source - " + "a file or a fileset."); - } - - + int fileProcessed = 0; + if (file == null && (filesets.size() == 0)) { + throw new BuildException( + "Specify at least one source - " + "a file or a fileset."); + } - if (file != null) { - if (file.exists() && file.canRead() && file.isFile()) { - doValidate(file); - fileProcessed++; - } else { - String errorMsg = "File " + file + " cannot be read"; - if (failOnError) { - throw new BuildException(errorMsg); + if (file != null) { + if (file.exists() && file.canRead() && file.isFile()) { + doValidate(file); + fileProcessed++; } else { - log(errorMsg, Project.MSG_ERR); + String errorMsg = "File " + file + " cannot be read"; + if (failOnError) { + throw new BuildException(errorMsg); + } else { + log(errorMsg, Project.MSG_ERR); + } } } - } - final int size = filesets.size(); - for (int i = 0; i < size; i++) { + final int size = filesets.size(); + for (int i = 0; i < size; i++) { - FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(getProject()); - String[] files = ds.getIncludedFiles(); + FileSet fs = (FileSet) filesets.elementAt(i); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); + String[] files = ds.getIncludedFiles(); - for (int j = 0; j < files.length; j++) { - File srcFile = new File(fs.getDir(getProject()), files[j]); - doValidate(srcFile); - fileProcessed++; + for (int j = 0; j < files.length; j++) { + File srcFile = new File(fs.getDir(getProject()), files[j]); + doValidate(srcFile); + fileProcessed++; + } } - } - onSuccessfulValidation(fileProcessed); + onSuccessfulValidation(fileProcessed); } finally { cleanup(); }