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

java.util.zip.ZipEntry.getTime() returns wrong initial value.

    Details

    • Subcomponent:
      jar
    • Resolved In Build:
      1.2beta4
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Verified

      Description



      Name: sdC67446 Date: 02/13/98


      method java.util.zip.ZipEntry.getTime() returns wrong initial value.

      Here is what documentation says:
      --------------------------------------------------
       public long getTime()
       Returns the modification time of the entry, or -1 if not specified.
       
      Here is the test demonstrating the bug:
      -----------------Test.java------------------------
      import java.util.zip.*;

      public class Test {
        
        public static void main(String[] args) {

          ZipEntry testentry = new ZipEntry("");
          
          if (testentry.getTime() != -1) {
            System.out.println("getTime() != -1");
          } else {
            System.out.println("it's ok.");
          }
        }
      }
      ---------Output from the test---------------------
      getTime() != -1
      --------------------------------------------------

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

        Attachments

          Activity

            People

            • Assignee:
              dconnellsunw David Connelly (Inactive)
              Reporter:
              sdmitriesunw Sergei Dmitriev (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: