You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anton Luht (JIRA)" <ji...@apache.org> on 2006/07/17 15:25:14 UTC

[jira] Updated: (HARMONY-899) JarEntry.getSodeSigners() throws NPE if certificates are null

     [ http://issues.apache.org/jira/browse/HARMONY-899?page=all ]

Anton Luht updated HARMONY-899:
-------------------------------

    Attachment: patch.txt

patch

> 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
>         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