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

zip file IO operations on Solaris fail if thread is interrupted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • core-libs
    • b45
    • 6
    • b49
    • generic, sparc
    • solaris, solaris_8, solaris_9, solaris_10
    • Verified

      The changes for
       6280693: Mmap the whole jar files takes too much perceived footprint
      have caused failures on Solaris when an interrupted thread uses the java.util.zip API.

      The following program:
      ---------------------------------------------------------------
      import java.util.zip.*;

      public class InterruptibleZip {
          private static String rtJar() {
      String bcp = System.getProperty("sun.boot.class.path");
      for (String jar : bcp.split("[;:]"))
      if (jar.endsWith("rt.jar"))
      return jar;
      throw new Error("Can't find rt.jar");
          }

          public static void main(String[] args) throws Exception {
      ZipFile zf = new ZipFile(rtJar());
      Thread.currentThread().interrupt();
      ZipEntry ze = zf.getEntry("java/lang/Object.class");
      System.out.println("interrupted="+Thread.interrupted());
      System.out.println(ze.getName());
          }
      }
      ---------------------------------------------------------------

      results in

      ...b45/binaries/solaris-sparc/jre/lib/rt.jar: error reading zip file
      Exception in thread "main" java.lang.NoClassDefFoundError: java/util/zip/ZipEntry

            xlu Xiaobin Lu (Inactive)
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: