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

[classlib][archive] ZipFile.getInputStream implements available() differently to the RI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0M12
    • Classlib
    • None
    • Patch Available

    Description

      static final String NAME = "javax/swing/text/html/parser/html32.bdtd";

      public void test() throws IOException

      { JarFile jar = new JarFile("swing.jar"); ZipEntry ze = jar.getEntry(NAME); InputStream is = jar.getInputStream(ze); System.out.println("Size = " + ze.getSize()); System.out.println("Available = " + is.available()); jar.close(); }

      On Harmony it prints:
      Size = 51140
      Available = 1

      On the RI it prints:
      Size = 51140
      Available = 51140

      We have recently deviated from compatibility with the RI in this matter.

      Attachments

        1. harmony-6394-2.patch
          2 kB
          Tim Ellison
        2. harmony-6394.patch
          2 kB
          Tim Ellison

        Activity

          People

            tellison Tim Ellison
            tellison Tim Ellison
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: