harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elena Semukhina (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1751) Classlib test org.apache.harmony.prefs.tests.java.util.prefs.PreferencesTest.testSystemNodeForPackage() fails
Date Tue, 10 Oct 2006 07:34:20 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1751?page=comments#action_12441081 ] 
            
Elena Semukhina commented on HARMONY-1751:
------------------------------------------

I made some experiments on RI.
On RI TestPref prints only a warning and does not throw SecurityException:

Oct 10, 2006 2:21:15 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not create windows registry node Software\JavaSoft\Prefs\java at
root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Oct 10, 2006 2:21:15 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\java a
t root 0x80000002.
Oct 10, 2006 2:21:15 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\java at ro
ot 0x80000002. Windows RegOpenKey(...) returned error code 2.

On the other hand, PreferencesTest fails on RI while invoking childrenNames() method with
BackingStoreException while it is not thrown on Harmony classlib:

1) testSystemNodeForPackage(org.apache.harmony.prefs.tests.java.util.prefs.Prefe
rencesTest)java.util.prefs.BackingStoreException: Could not open windowsregistry
 node Software\JavaSoft\Prefs\java\lang at root 0x80000002.
        at java.util.prefs.WindowsPreferences.childrenNamesSpi(WindowsPreference
s.java:719)
        at java.util.prefs.AbstractPreferences.childrenNames(AbstractPreferences
.java:699)
        at org.apache.harmony.prefs.tests.java.util.prefs.PreferencesTest.testSy
stemNodeForPackage(PreferencesTest.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)

Possibly we should change j.u.prefs.Preferences behavior to be compatible with RI.



> Classlib test org.apache.harmony.prefs.tests.java.util.prefs.PreferencesTest.testSystemNodeForPackage()
fails
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1751
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1751
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Elena Semukhina
>         Attachments: TestPref.java
>
>
> The test fails for me on Windows on both j9 and drlvm with the following assertion:
> ant -Dbuild.module=prefs -Dtest.case=PreferencesTest test
> testSystemNodeForPackage Error N/A
> (J9)
> java.lang.SecurityException at java.util.prefs.RegistryPreferencesImpl.childSpi(RegistryPreferencesImpl.java:116)
at java.util.prefs.AbstractPreferences.getNodeFromBackend(AbstractPreferences.java:645) at
java.util.prefs.AbstractPreferences.nodeImpl(AbstractPreferences.java:626) at java.util.prefs.AbstractPreferences.node(AbstractPreferences.java:597)
at java.util.prefs.Preferences.systemNodeForPackage(Preferences.java:767) at org.apache.harmony.prefs.tests.java.util.prefs.PreferencesTest.testSystemNodeForPackage(PreferencesTest.java:62)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) 
> (drlvm)
> java.lang.SecurityException at java.util.prefs.RegistryPreferencesImpl.childSpi(RegistryPreferencesImpl.java:116)
at java.util.prefs.AbstractPreferences.getNodeFromBackend(AbstractPreferences.java:644) at
java.util.prefs.AbstractPreferences.nodeImpl(AbstractPreferences.java:625) at java.util.prefs.AbstractPreferences.node(AbstractPreferences.java:595)
at java.util.prefs.Preferences.systemNodeForPackage(Preferences.java:767) at org.apache.harmony.prefs.tests.java.util.prefs.PreferencesTest.testSystemNodeForPackage(PreferencesTest.java:62)
at java.lang.reflect.VMReflection.invokeMethod(Native Method)

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