ASF Bugzilla – Attachment 11292 Details for
Bug 28504
[PATCH] Capitalize /ZIP|[JWE]AR/; update Zip.reset() overloads
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Suggested patch
patch.txt (text/plain), 4.76 KB, created by
Jesse Glick
on 2004-04-20 17:24:32 UTC
(
hide
)
Description:
Suggested patch
Filename:
MIME Type:
Creator:
Jesse Glick
Created:
2004-04-20 17:24:32 UTC
Size:
4.76 KB
patch
obsolete
>Index: src/main/org/apache/tools/ant/taskdefs/Ear.java >=================================================================== >RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Ear.java,v >retrieving revision 1.29 >diff -u -u -r1.29 Ear.java >--- src/main/org/apache/tools/ant/taskdefs/Ear.java 9 Mar 2004 16:48:04 -0000 1.29 >+++ src/main/org/apache/tools/ant/taskdefs/Ear.java 20 Apr 2004 17:09:21 -0000 >@@ -42,8 +42,8 @@ > */ > public Ear() { > super(); >- archiveType = "ear"; >- emptyBehavior = "create"; >+ archiveType = "EAR"; >+ // handled by super: emptyBehavior = "create"; > } > > /** >@@ -131,4 +131,10 @@ > descriptorAdded = false; > super.cleanUp(); > } >+ >+ public void reset() { >+ super.reset(); >+ archiveType = "EAR"; >+ } >+ > } >Index: src/main/org/apache/tools/ant/taskdefs/Jar.java >=================================================================== >RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v >retrieving revision 1.85 >diff -u -u -r1.85 Jar.java >--- src/main/org/apache/tools/ant/taskdefs/Jar.java 9 Mar 2004 16:48:05 -0000 1.85 >+++ src/main/org/apache/tools/ant/taskdefs/Jar.java 20 Apr 2004 17:09:21 -0000 >@@ -118,7 +118,7 @@ > /** constructor */ > public Jar() { > super(); >- archiveType = "jar"; >+ archiveType = "JAR"; > emptyBehavior = "create"; > setEncoding("UTF8"); > rootEntries = new Vector(); >@@ -603,7 +603,7 @@ > > ZipOutputStream zOut = null; > try { >- log("Building MANIFEST-only jar: " >+ log("Building manifest-only JAR: " > + getDestFile().getAbsolutePath()); > zOut = new ZipOutputStream(new FileOutputStream(getDestFile())); > >@@ -616,7 +616,7 @@ > initZipOutputStream(zOut); > finalizeZipOutputStream(zOut); > } catch (IOException ioe) { >- throw new BuildException("Could not create almost empty JAR archive" >+ throw new BuildException("Could not create almost empty JAR" > + " (" + ioe.getMessage() + ")", ioe, > getLocation()); > } finally { >@@ -665,6 +665,9 @@ > mergeManifestsMain = false; > manifestFile = null; > index = false; >+ archiveType = "JAR"; >+ emptyBehavior = "create"; >+ setEncoding("UTF8"); > } > > public static class FilesetManifestConfig extends EnumeratedAttribute { >Index: src/main/org/apache/tools/ant/taskdefs/War.java >=================================================================== >RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/War.java,v >retrieving revision 1.39 >diff -u -u -r1.39 War.java >--- src/main/org/apache/tools/ant/taskdefs/War.java 9 Mar 2004 16:48:06 -0000 1.39 >+++ src/main/org/apache/tools/ant/taskdefs/War.java 20 Apr 2004 17:09:21 -0000 >@@ -59,8 +59,8 @@ > > public War() { > super(); >- archiveType = "war"; >- emptyBehavior = "create"; >+ archiveType = "WAR"; >+ // handled by super: emptyBehavior = "create"; > } > > /** >@@ -169,4 +169,10 @@ > descriptorAdded = false; > super.cleanUp(); > } >+ >+ public void reset() { >+ super.reset(); >+ archiveType = "WAR"; >+ } >+ > } >Index: src/main/org/apache/tools/ant/taskdefs/Zip.java >=================================================================== >RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v >retrieving revision 1.124 >diff -u -u -r1.124 Zip.java >--- src/main/org/apache/tools/ant/taskdefs/Zip.java 16 Apr 2004 09:35:21 -0000 1.124 >+++ src/main/org/apache/tools/ant/taskdefs/Zip.java 20 Apr 2004 17:09:23 -0000 >@@ -72,7 +72,7 @@ > // shadow of the above if the value is altered in execute > private boolean savedDoUpdate = false; > private boolean doFilesonly = false; >- protected String archiveType = "zip"; >+ protected String archiveType = "ZIP"; > > // For directories: > private static final long EMPTY_CRC = new CRC32 ().getValue (); >@@ -327,7 +327,7 @@ > public void executeMain() throws BuildException { > > if (baseDir == null && filesets.size() == 0 >- && groupfilesets.size() == 0 && "zip".equals(archiveType)) { >+ && groupfilesets.size() == 0 && "ZIP".equals(archiveType)) { > throw new BuildException("basedir attribute must be set, " > + "or at least " > + "one fileset must be given!"); >@@ -1160,7 +1160,7 @@ > baseDir = null; > groupfilesets.removeAllElements(); > duplicate = "add"; >- archiveType = "zip"; >+ archiveType = "ZIP"; > doCompress = true; > emptyBehavior = "skip"; > doUpdate = false;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28504
: 11292