← Back to team overview

openjdk team mailing list archive

[Bug 795914] Re: Java method getEntry in class ZipFile calls a native method which return null (it should not since Jar file contains the entry !)

 

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in Ubuntu.
https://bugs.launchpad.net/bugs/795914

Title:
  Java method getEntry  in class ZipFile  calls a native method which
  return null (it should not since Jar file contains the entry !)

Status in “openjdk-6” package in Ubuntu:
  New

Bug description:
  There is a problem with the Java native method:

  private static native long getEntry(long jzfile, String name,
                                          boolean addSlash);

  it returns null although I pass name of a class file which I know for
  sure is located in the Jar file (the ZipFile).

  
  This native method is called from the method :  public ZipEntry getEntry(String name)
  which is in the class   java.util.zip.ZipFile;

  This method looks like:

   /**
       * Returns the zip file entry for the specified name, or null
       * if not found.
       *
       * @param name the name of the entry
       * @return the zip file entry, or null if not found
       * @throws IllegalStateException if the zip file has been closed
       */
      public ZipEntry getEntry(String name) {
          if (name == null) {
              throw new NullPointerException("name");
          }
          long jzentry = 0;
          synchronized (this) {
              ensureOpen();
              jzentry = getEntry(jzfile, name, true);
              if (jzentry != 0) {
                  ZipEntry ze = new ZipEntry(name, jzentry);
                  freeEntry(jzfile, jzentry);
                  return ze;
              }
          }
          return null;
      }


  
  I tried different jdks but all have this problem:

  1.   java-6-openjdk
  2.   jdk1.6.0_26
  3.  j2sdk1.4.1_07

  I believe that since this is a native problem then it must be an
  Ubuntu problem and not java's "fault"

  Please advise:

  thanks

  Dag

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: openjdk-6-jdk 6b20-1.9.7-0ubuntu1~10.04.1
  ProcVersionSignature: Ubuntu 2.6.32-32.62-generic 2.6.32.38+drm33.16
  Uname: Linux 2.6.32-32-generic i686
  Architecture: i386
  Date: Sat Jun 11 14:57:32 2011
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
  ProcEnviron:
   LANG=en_US.utf8
   SHELL=/bin/bash
  SourcePackage: openjdk-6

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/795914/+subscriptions



References