Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4167428

changed behavior for java.util.zip.(Zip)InflaterInputStream.skip

    Details

    • Subcomponent:
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5

      Description



      Name: sdC67446 Date: 08/19/98


      The behavior for method
      java.util.zip.ZipInputStream.skip(int n)
      has been changed since jdk1.2beta4.
      The spec for this method doesn't specify expected
      behavior if 'n'<0.
      Currently method throws unspecified IllegalArgumentException.

      The java.util.zip.InflaterInputStream.skip(int n) has the same
      problem.

      Thus the jck1.2beta4 tests
          api/java_util/zip/index.html#InflaterIStreamTest
          api/java_util/zip/index.html#ZipIStreamTest2
      now fail.

      The doc says:
      -------------------------------------------------------------
      (ZipInputStream class)

      public long skip(long n)
               throws IOException

            Skips specified number of bytes in the current ZIP entry.
            Parameters:
                  n - the number of bytes to skip
            Returns:
                  the actual number of bytes skipped
            Throws:
                  ZipException - if a ZIP file error has occurred
                  IOException - if an I/O error has occurred
            Overrides:
                  skip in class InflaterInputStream
      ------------------------------------------------------------

      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              shommel Scott Hommel (Inactive)
              Reporter:
              sdmitriesunw Sergei Dmitriev (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: