You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Ivanov (JIRA)" <ji...@apache.org> on 2007/04/12 08:17:32 UTC

[jira] Commented: (HARMONY-3628) [drlvm][testing] API test org.apache.harmony.luni.tests.java.lang.SecurityManagerTest failed on DRLVM

    [ https://issues.apache.org/jira/browse/HARMONY-3628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488266 ] 

Vladimir Ivanov commented on HARMONY-3628:
------------------------------------------

Seems, it is a bug in the classlib (java.lang.SecurityManager class).

According to specification the classloader may be 'null' in case of 'bootstrap' loader. So the code (currentLoadedClass(), for example) should be updated from:
----
            ClassLoader cl = classes[i].getClassLoaderImpl();
            if (!cl.isSystemClassLoader()) {
----
to something like
----
            ClassLoader cl = classes[i].getClassLoaderImpl();
            if (cl != null && !cl.isSystemClassLoader()) {
----
I'll prepare patch soon.

> [drlvm][testing] API test org.apache.harmony.luni.tests.java.lang.SecurityManagerTest failed on DRLVM
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3628
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3628
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Vladimir Ivanov
>         Attachments: exclude.patch
>
>
> The test org.apache.harmony.luni.tests.java.lang.SecurityManagerTest failed on DRLVM (on all platforms).
> It is not a regression: this test was updated yesterday.
> Note, this issue is not reproduced on the IBMVM.
>  
> -------------- failure log ---------------------------------
> error: test_classLoaderDepth org.apache.harmony.luni.tests.java.lang.SecurityManagerTest
> error: test_currentClassLoader org.apache.harmony.luni.tests.java.lang.SecurityManagerTest
> error: test_currentLoadedClass org.apache.harmony.luni.tests.java.lang.SecurityManagerTest
> error: test_inClassLoader org.apache.harmony.luni.tests.java.lang.SecurityManagerTest
> Unit Test Error Details:  (4)
>                 
> Test: test_classLoaderDepthClass: org.apache.harmony.luni.tests.java.lang.SecurityManagerTestjava.lang.NullPointerException
>             at java.lang.SecurityManager.classLoaderDepth(SecurityManager.java:625)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest$MockSecurityManager.classLoaderDepth(SecurityManagerTest.java:562)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_classLoaderDepth(SecurityManagerTest.java:515)
>             at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>  
> Test: test_currentClassLoaderClass: org.apache.harmony.luni.tests.java.lang.SecurityManagerTestjava.lang.NullPointerException
>             at java.lang.SecurityManager.currentClassLoader(SecurityManager.java:589)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest$MockSecurityManager.currentClassLoader(SecurityManagerTest.java:567)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_currentClassLoader(SecurityManagerTest.java:522)
>             at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>  
> Test: test_currentLoadedClassClass: org.apache.harmony.luni.tests.java.lang.SecurityManagerTestjava.lang.NullPointerException
>             at java.lang.SecurityManager.currentLoadedClass(SecurityManager.java:660)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest$MockSecurityManager.currentLoadedClass(SecurityManagerTest.java:572)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_currentLoadedClass(SecurityManagerTest.java:529)
>             at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>  
> Test: test_inClassLoaderClass: org.apache.harmony.luni.tests.java.lang.SecurityManagerTestjava.lang.NullPointerException
>             at java.lang.SecurityManager.currentClassLoader(SecurityManager.java:589)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest$MockSecurityManager.currentClassLoader(SecurityManagerTest.java:567)
>             at java.lang.SecurityManager.inClassLoader(SecurityManager.java:714)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest$MockSecurityManager.inClassLoader(SecurityManagerTest.java:587)
>             at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_inClassLoader(SecurityManagerTest.java:545)
>             at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.