Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5796

[classlib][pack200] Pack200UnpackerAdapter still using Segment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0M5
    • 5.0M6
    • Classlib
    • None
    • All pack200 Java 5
    • Patch Available
    • Novice

    Description

      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();
        }

      Attachments

        1. main.patch
          0.9 kB
          Andrew Cornwall

        Activity

          People

            sjanuary Sian January
            andrewc Andrew Cornwall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: