You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/03/04 03:56:56 UTC

[jira] Updated: (HARMONY-6108) [classlib] [prefs] Preferences.nodeExists(null) should throw NPE when Preferences node has been removed

     [ https://issues.apache.org/jira/browse/HARMONY-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-6108:
--------------------------------

    Attachment: HARMONY-6108.diff

Would you please help to try it?

> [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
>
>         Attachments: HARMONY-6108.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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.