You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Cornwall (JIRA)" <ji...@apache.org> on 2008/05/01 18:36:56 UTC

[jira] Closed: (HARMONY-5796) [classlib][pack200] Pack200UnpackerAdapter still using Segment

     [ https://issues.apache.org/jira/browse/HARMONY-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall closed HARMONY-5796.
------------------------------------


I must have been really out of it that day! Patch applied was better than expected. Thanks.

> [classlib][pack200] Pack200UnpackerAdapter still using Segment
> --------------------------------------------------------------
>
>                 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
>            Assignee: Sian January
>             Fix For: 5.0M6
>
>         Attachments: main.patch
>
>
> 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.