harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Luht (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-899) JarEntry.getSodeSigners() throws NPE if certificates are null
Date Mon, 17 Jul 2006 13:23:13 GMT
JarEntry.getSodeSigners() throws NPE if certificates are null
-------------------------------------------------------------

                 Key: HARMONY-899
                 URL: http://issues.apache.org/jira/browse/HARMONY-899
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP professional
            Reporter: Anton Luht
            Priority: Minor


VM + classlib revision 422694, build: msvc debug

Harmony throws unspecified NullPointerException for java.util.jar.JarEntry. getCodeSigners()
while
RI returns "null" value, which is correct.

Java 1.5.0 spec says:
"Returns: 
the CodeSigner objects for this entry, or null if none.
".

import java.util.jar.JarEntry;
import java.security.CodeSigner;

public class Test {
             public static void main(String args[]) {
                         JarEntry localJarEntry = new JarEntry("aaa");
                         try
                         {
                                    localJarEntry.getCodeSigners();
                                    System.out.println("getCodeSigners()=" +localJarEntry.getCodeSigners());
                         }
                         catch(Exception e)
                         { 
                           e.printStackTrace();
                         }
             }
}

OUTPUT:

SUN
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
getCodeSigners()=null

Harmony:
java.lang.NullPointerException
        at java.util.jar.JarEntry.getCodeSigners(JarEntry.java:139)
        at java.util.jar.JarEntry.getCodeSigners(JarEntry.java:123)
        at Test.main(Test.java:9)

Please see the patch with JUnit test and fix for this issue attached




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message