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:46:56 UTC

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

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


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

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Regis Xu reassigned HARMONY-6108:
---------------------------------

    Assignee: Regis Xu

> [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
>            Assignee: Regis Xu
>             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.


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

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou closed HARMONY-6108.
-------------------------------


Thanks, Regis.

> [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
>            Assignee: Regis Xu
>             Fix For: 5.0M10
>
>         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.


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

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Regis Xu resolved HARMONY-6108.
-------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.0M9)
                   5.0M10

Thanks Kevin,

Patch applied at r765529, please verify it was applied as you expected.

> [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
>            Assignee: Regis Xu
>             Fix For: 5.0M10
>
>         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.