harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6108) [classlib] [prefs] Preferences.nodeExists(null) should throw NPE when Preferences node has been removed
Date Wed, 04 Mar 2009 02:46:56 GMT
[classlib] [prefs] Preferences.nodeExists(null) should throw NPE when Preferences node has
been removed
-------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6108
                 URL: https://issues.apache.org/jira/browse/HARMONY-6108
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M8
            Reporter: Kevin Zhou
             Fix For: 5.0M9


Given a test scenario[1], conduct it on RI and HARMONY.
RI works well, while HARMONY fails on the 2nd try-catch.
When a given Preferences node is removed, Preferences.nodeExist(null) should throw NPE rather
than IllegalStateException.
[1]
public void test_nodeExists() throws BackingStoreException {
AbstractPreferences test = (AbstractPreferences) Preferences.userRoot()
.node("test");
// 1st
try { test.nodeExists(null); fail("should throw NullPointerException"); } catch (NullPointerException
e) { // Expected }

test.removeNode();
// 2nd
try { test.nodeExists(null); fail("should throw NullPointerException"); } } catch (NullPointerException
e) { // Expected }
}

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


Mime
View raw message