From 27868015eb791e7c83ebc0e12f6a255575504d0e Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 3 Nov 2008 16:45:39 +0000 Subject: [PATCH] whitespace git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@710102 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/taskdefs/Ear.java | 9 +++--- .../org/apache/tools/ant/taskdefs/Jar.java | 21 +++++++------- .../org/apache/tools/ant/taskdefs/War.java | 13 +++++---- .../org/apache/tools/ant/taskdefs/Zip.java | 28 +++++++++++-------- 4 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Ear.java b/src/main/org/apache/tools/ant/taskdefs/Ear.java index 9cf96aa1d..6bc767986 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Ear.java +++ b/src/main/org/apache/tools/ant/taskdefs/Ear.java @@ -131,10 +131,11 @@ public class Ear extends Jar { || !FILE_UTILS.fileNameEquals(deploymentDescriptor, file) || descriptorAdded) { logOnFirstPass("Warning: selected " + archiveType - + " files include a " + XML_DESCRIPTOR_PATH + " which will" - + " be ignored (please use appxml attribute to " - + archiveType + " task)", - Project.MSG_WARN); + + " files include a " + XML_DESCRIPTOR_PATH + + " which will" + + " be ignored (please use appxml attribute to " + + archiveType + " task)", + Project.MSG_WARN); } else { super.zipFile(file, zOut, vPath, mode); descriptorAdded = true; diff --git a/src/main/org/apache/tools/ant/taskdefs/Jar.java b/src/main/org/apache/tools/ant/taskdefs/Jar.java index a420dd74f..fb3d20971 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Jar.java +++ b/src/main/org/apache/tools/ant/taskdefs/Jar.java @@ -637,8 +637,9 @@ public class Jar extends Zip { } } else if (INDEX_NAME.equalsIgnoreCase(vPath) && index) { logOnFirstPass("Warning: selected " + archiveType - + " files include a " + INDEX_NAME + " which will" - + " be replaced by a newly generated one.", Project.MSG_WARN); + + " files include a " + INDEX_NAME + " which will" + + " be replaced by a newly generated one.", + Project.MSG_WARN); } else { if (index && vPath.indexOf("/") == -1) { rootEntries.addElement(vPath); @@ -672,7 +673,7 @@ public class Jar extends Zip { && !filesetManifestConfig.getValue().equals("skip")) { // we add this to our group of fileset manifests logOnFirstPass("Found manifest to merge in file " + file, - Project.MSG_VERBOSE); + Project.MSG_VERBOSE); try { Manifest newManifest = null; @@ -754,14 +755,14 @@ public class Jar extends Zip { try { originalManifest = getManifestFromJar(zipFile); if (originalManifest == null) { - logOnFirstPass("Updating jar since the current jar has no manifest", - Project.MSG_VERBOSE); + logOnFirstPass("Updating jar since the current jar has" + + " no manifest", Project.MSG_VERBOSE); needsUpdate = true; } else { Manifest mf = createManifest(); if (!mf.equals(originalManifest)) { - logOnFirstPass("Updating jar since jar manifest has changed", - Project.MSG_VERBOSE); + logOnFirstPass("Updating jar since jar manifest has" + + " changed", Project.MSG_VERBOSE); needsUpdate = true; } } @@ -806,7 +807,7 @@ public class Jar extends Zip { + zipFile + " because no files were included.", Project.MSG_WARN); } - return true; + return true; } else if (emptyBehavior.equals("fail")) { throw new BuildException("Cannot create " + archiveType + " archive " + zipFile @@ -817,8 +818,8 @@ public class Jar extends Zip { ZipOutputStream zOut = null; try { if (!skipWriting) { - log("Building MANIFEST-only jar: " - + getDestFile().getAbsolutePath()); + log("Building MANIFEST-only jar: " + + getDestFile().getAbsolutePath()); } zOut = new ZipOutputStream(new FileOutputStream(getDestFile())); diff --git a/src/main/org/apache/tools/ant/taskdefs/War.java b/src/main/org/apache/tools/ant/taskdefs/War.java index 7d9937b5a..a16bf46c2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/War.java +++ b/src/main/org/apache/tools/ant/taskdefs/War.java @@ -189,12 +189,13 @@ public class War extends Jar { //check to see if we warn or not if (!FILE_UTILS.fileNameEquals(addedWebXmlFile, file)) { logOnFirstPass("Warning: selected " + archiveType - + " files include a second " + XML_DESCRIPTOR_PATH - + " which will be ignored.\n" - + "The duplicate entry is at " + file + '\n' - + "The file that will be used is " - + addedWebXmlFile, - Project.MSG_WARN); + + " files include a second " + + XML_DESCRIPTOR_PATH + + " which will be ignored.\n" + + "The duplicate entry is at " + file + '\n' + + "The file that will be used is " + + addedWebXmlFile, + Project.MSG_WARN); } } else { //no added file, yet diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index 6259fa198..5d6961be8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -704,7 +704,7 @@ public class Zip extends MatchingTask { if (doUpdate && !zipFile.exists()) { doUpdate = false; logOnFirstPass("ignoring update attribute as " + archiveType - + " doesn't exist.", Project.MSG_DEBUG); + + " doesn't exist.", Project.MSG_DEBUG); } } @@ -721,7 +721,7 @@ public class Zip extends MatchingTask { for (int j = 0; j < files.length; j++) { logOnFirstPass("Adding file " + files[j] + " to fileset", - Project.MSG_VERBOSE); + Project.MSG_VERBOSE); ZipFileSet zf = new ZipFileSet(); zf.setProject(getProject()); zf.setSrc(new File(basedir, files[j])); @@ -1153,12 +1153,13 @@ public class Zip extends MatchingTask { if (emptyBehavior.equals("skip")) { if (doUpdate) { logOnFirstPass(archiveType + " archive " + zipFile - + " not updated because no new files were included.", - Project.MSG_VERBOSE); + + " not updated because no new files were" + + " included.", Project.MSG_VERBOSE); } else { - logOnFirstPass("Warning: skipping " + archiveType + " archive " - + zipFile + " because no files were included.", - Project.MSG_WARN); + logOnFirstPass("Warning: skipping " + archiveType + + " archive " + zipFile + + " because no files were included.", + Project.MSG_WARN); } } else if (emptyBehavior.equals("fail")) { throw new BuildException("Cannot create " + archiveType @@ -1457,8 +1458,9 @@ public class Zip extends MatchingTask { int mode, ZipExtraField[] extra) throws IOException { if (doFilesonly) { - logOnFirstPass("skipping directory " + vPath + " for file-only archive", - Project.MSG_VERBOSE); + logOnFirstPass("skipping directory " + vPath + + " for file-only archive", + Project.MSG_VERBOSE); return; } if (addedDirs.get(vPath) != null) { @@ -1515,7 +1517,8 @@ public class Zip extends MatchingTask { if (entries.contains(vPath)) { if (duplicate.equals("preserve")) { - logOnFirstPass(vPath + " already added, skipping", Project.MSG_INFO); + logOnFirstPass(vPath + " already added, skipping", + Project.MSG_INFO); return; } else if (duplicate.equals("fail")) { throw new BuildException("Duplicate file " + vPath @@ -1524,7 +1527,7 @@ public class Zip extends MatchingTask { } else { // duplicate equal to add, so we continue logOnFirstPass("duplicate file " + vPath - + " found, adding.", Project.MSG_VERBOSE); + + " found, adding.", Project.MSG_VERBOSE); } } else { logOnFirstPass("adding entry " + vPath, Project.MSG_VERBOSE); @@ -1745,7 +1748,8 @@ public class Zip extends MatchingTask { v.addElement(orig[i]); } else { logOnFirstPass("Ignoring directory " + orig[i].getName() - + " as only files will be added.", Project.MSG_VERBOSE); + + " as only files will be added.", + Project.MSG_VERBOSE); } }