harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-899) JarEntry.getSodeSigners() throws NPE if certificates are null
Date Tue, 18 Jul 2006 00:21:21 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-899?page=all ]

Nathan Beyer resolved HARMONY-899.
----------------------------------

    Resolution: Fixed
      Assignee: Nathan Beyer

Applied at r422927. Please verify the commit. Thanks.

> 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
>         Assigned To: Nathan Beyer
>            Priority: Minor
>         Attachments: patch.txt
>
>
> 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