harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cornwall (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5796) [classlib][pack200]
Date Fri, 25 Apr 2008 21:11:55 GMT
[classlib][pack200]
-------------------

                 Key: HARMONY-5796
                 URL: https://issues.apache.org/jira/browse/HARMONY-5796
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M5
         Environment: All pack200 Java 5
            Reporter: Andrew Cornwall


The Java5 Pack200UnpackerAdapter still uses the old Segment code instead of the new Archive
code. Here's a quick patch:

Index: C:/harmony/pack200workspace/Pack200 working/src/main/java5/org/apache/harmony/unpack200/Pack200UnpackerAdapter.java
===================================================================
--- C:/harmony/pack200workspace/Pack200 working/src/main/java5/org/apache/harmony/unpack200/Pack200UnpackerAdapter.java
(revision 651261)
+++ C:/harmony/pack200workspace/Pack200 working/src/main/java5/org/apache/harmony/unpack200/Pack200UnpackerAdapter.java
(working copy)
@@ -46,13 +46,8 @@
 					"Must specify both input and output streams");
 		completed(0);
 		try {
-			while (in.available() > 0) {
-			    new Segment().unpack(in, out);
-				out.flush();
-			}
-		} catch (Pack200Exception e) {
-			throw new IOException("Failed to unpack Jar:" + String.valueOf(e));
-		}
+			Archive archive = new Archive(in, out);
+			archive.unpack();
 		completed(1);
 		in.close();
 	}



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message