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

javac returns incorrect value for lastModifiedTime() when source is a zip file archive

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 6u10, 6u21, 7
    • Fix Version/s: 7
    • Component/s: tools
    • Subcomponent:
    • Introduced In Version:
      6u4
    • Resolved In Build:
      b32
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp
    • Verification:
      Not verified

      Backports

        Description

        The proposed new javap -sysinfo option has revealed a bug in the value of lastModifiedTime() used internally by javac when a class comes from a zip file archive.

        Here is the output for java.lang.String:

        JavapTask: /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/rt.jar(java/lang/String.class)
        Classfile jar:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/rt.jar!java/lang/String.class
        Last modified Jan 11, 1970; size 15572 bytes
        MD5 checksum 6977f62c32cd39574a15a1fde238fc74

        (Note: Jan 11, 1970)

        Here is the corresponding output from unzip:
            15572 09-24-07 22:49 java/lang/String.class
        and from jar
         15572 Mon Sep 24 22:49:32 PDT 2007 java/lang/String.class

        This needs to be fixed, as javac uses last modified time internally to determine if class files are up to date.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jjg Jonathan Gibbons
                  Reporter:
                  jjg Jonathan Gibbons
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: