You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2006/11/29 09:26:22 UTC

[jira] Updated: (HARMONY-2356) [classlib][luni]The Map from System.getEnv should throw NullPointerException while get(null) and is not modifiable.

     [ http://issues.apache.org/jira/browse/HARMONY-2356?page=all ]

Leo Li updated HARMONY-2356:
----------------------------

                 Summary: [classlib][luni]The Map from System.getEnv should throw NullPointerException while get(null) and is not modifiable.  (was: [classlib][luni]Map wrapped by Collections.unmodifiableMap should throw NullPointerException while get(null).)
    Estimated Complexity: Moderate  (was: Novice)
             Description: 
Here is the testcase:
 public void testUnmodifiableMap()
    {
        Map map = System.getEnv();
                
        try {
            map.get(null);
            fail("Should throw NullPointerExcepiton.");
        } catch (NullPointerException e) {
            //expected
        }     
               
    }

RI passes.
Harmony fails.

  was:
Here is the testcase:
 public void testUnmodifiableMap()
    {
        Map map = Collections.unmodifiableMap(new HashMap<String,String>());
        System.out.println(map.getClass());
        
        try {
            map.get(null);
            fail("Should throw NullPointerExcepiton.");
        } catch (NullPointerException e) {
            //expected
        }     
               
    }

RI passes.
Harmony fails.


> [classlib][luni]The Map from System.getEnv should throw NullPointerException while get(null) and is not modifiable.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2356
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2356
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Leo Li
>
> Here is the testcase:
>  public void testUnmodifiableMap()
>     {
>         Map map = System.getEnv();
>                 
>         try {
>             map.get(null);
>             fail("Should throw NullPointerExcepiton.");
>         } catch (NullPointerException e) {
>             //expected
>         }     
>                
>     }
> RI passes.
> Harmony fails.

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