I'm unable to build/bootstrap Ant from from current CVS. It's complaining that Jar.java is attempting to use a nonexistent Manifest constructor, Manifest(InputStream). This was converted to Manifest(Reader) in revision 1.12; the attached patch fixes each InputStream call by creating an InputStreamReader around it.

--
fix, n., v.  What one does when a problem has been reported too many
times to be ignored.
  --The New Hacker's Dictionary, 3rd ed.
Index: src/main/org/apache/tools/ant/taskdefs/Jar.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
retrieving revision 1.21
diff -u -w -r1.21 Jar.java
--- src/main/org/apache/tools/ant/taskdefs/Jar.java     2001/08/01 12:56:23     
1.21
+++ src/main/org/apache/tools/ant/taskdefs/Jar.java     2001/12/19 18:19:32
@@ -103,7 +103,8 @@
         InputStream is = null;
         try {
             is = new FileInputStream(manifestFile);
-            Manifest newManifest = new Manifest(is);
+            InputStreamReader r = new InputStreamReader(is);
+            Manifest newManifest = new Manifest(r);
             if (manifest == null) {
                 manifest = getDefaultManifest();
             }
@@ -162,7 +163,8 @@
             if (in == null) {
                 throw new BuildException("Could not find default manifest: " + 
s);
             }
-            return new Manifest(in);
+            InputStreamReader r = new InputStreamReader(in);
+            return new Manifest(r);
         }
         catch (ManifestException e) {
             throw new BuildException("Default manifest is invalid !!");
@@ -204,11 +206,12 @@
      */
     private void zipManifestEntry(InputStream is) throws IOException {
         try {
+            InputStreamReader r = new InputStreamReader(is);
             if (execManifest == null) {
-                execManifest = new Manifest(is);
+                execManifest = new Manifest(r);
             }
             else if (isAddingNewFiles()) {
-                execManifest.merge(new Manifest(is));
+                execManifest.merge(new Manifest(r));
             }
         }
         catch (ManifestException e) {
@@ -281,7 +284,7 @@
                 if (entry == null) {
                     return false;
                 }
-                Manifest currentManifest = new 
Manifest(theZipFile.getInputStream(entry));
+                Manifest currentManifest = new Manifest(new 
InputStreamReader(theZipFile.getInputStream(entry)));
                 if (!currentManifest.equals(manifest)) {
                     return false;
                 }

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to