You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anton Luht (JIRA)" <ji...@apache.org> on 2006/07/17 19:03:15 UTC

[jira] Created: (HARMONY-901) java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null

java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null
--------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-901
                 URL: http://issues.apache.org/jira/browse/HARMONY-901
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP Professional
            Reporter: Anton Luht
            Priority: Minor


VM + classlib revision 422694 msvc debug build

Problem:
java.util.Locale(String, String, String) does not throw NullPointerException when one of arguments is null.

RI throws it.

Java spec 1.5.0 says:

"Throws: 

NullPointerException - thrown if any argument is null.

".

import java.util.Locale;

public class Test {
             public static void main(String args[]) {
                        try  {
                                    new Locale("aaa", "ccc", null);
                                    System.out.println("No Exception!");
                         } catch (NullPointerException e) { 
                                     System.out.println("Exception thrown "+e);
                                    e.printStackTrace();
                         }          
        }
}

Output in RI:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
Exception thrown java.lang.NullPointerException
java.lang.NullPointerException
        at java.util.Locale.<init>(Locale.java:247)
        at Test.main(test.java:6)

Output in Harmony:
No Exception!

---------
The patch with JUnit test and classlib code modification that resolves this problem is attached

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

        

[jira] Updated: (HARMONY-901) java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null

Posted by "Anton Luht (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-901?page=all ]

Anton Luht updated HARMONY-901:
-------------------------------

    Attachment: patch.txt

patch

> java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-901
>                 URL: http://issues.apache.org/jira/browse/HARMONY-901
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>            Priority: Minor
>         Attachments: patch.txt
>
>
> VM + classlib revision 422694 msvc debug build
> Problem:
> java.util.Locale(String, String, String) does not throw NullPointerException when one of arguments is null.
> RI throws it.
> Java spec 1.5.0 says:
> "Throws: 
> NullPointerException - thrown if any argument is null.
> ".
> import java.util.Locale;
> public class Test {
>              public static void main(String args[]) {
>                         try  {
>                                     new Locale("aaa", "ccc", null);
>                                     System.out.println("No Exception!");
>                          } catch (NullPointerException e) { 
>                                      System.out.println("Exception thrown "+e);
>                                     e.printStackTrace();
>                          }          
>         }
> }
> Output in RI:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Exception thrown java.lang.NullPointerException
> java.lang.NullPointerException
>         at java.util.Locale.<init>(Locale.java:247)
>         at Test.main(test.java:6)
> Output in Harmony:
> No Exception!
> ---------
> The patch with JUnit test and classlib code modification that resolves this problem is attached

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

        

[jira] Closed: (HARMONY-901) java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-901?page=all ]

Nathan Beyer closed HARMONY-901.
--------------------------------


verified

> java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-901
>                 URL: http://issues.apache.org/jira/browse/HARMONY-901
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Nathan Beyer
>            Priority: Minor
>         Attachments: patch.txt
>
>
> VM + classlib revision 422694 msvc debug build
> Problem:
> java.util.Locale(String, String, String) does not throw NullPointerException when one of arguments is null.
> RI throws it.
> Java spec 1.5.0 says:
> "Throws: 
> NullPointerException - thrown if any argument is null.
> ".
> import java.util.Locale;
> public class Test {
>              public static void main(String args[]) {
>                         try  {
>                                     new Locale("aaa", "ccc", null);
>                                     System.out.println("No Exception!");
>                          } catch (NullPointerException e) { 
>                                      System.out.println("Exception thrown "+e);
>                                     e.printStackTrace();
>                          }          
>         }
> }
> Output in RI:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Exception thrown java.lang.NullPointerException
> java.lang.NullPointerException
>         at java.util.Locale.<init>(Locale.java:247)
>         at Test.main(test.java:6)
> Output in Harmony:
> No Exception!
> ---------
> The patch with JUnit test and classlib code modification that resolves this problem is attached

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

        

[jira] Resolved: (HARMONY-901) java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-901?page=all ]

Nathan Beyer resolved HARMONY-901.
----------------------------------

    Resolution: Fixed

Patch applied, please verify it. Thanks.

> java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-901
>                 URL: http://issues.apache.org/jira/browse/HARMONY-901
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Nathan Beyer
>            Priority: Minor
>         Attachments: patch.txt
>
>
> VM + classlib revision 422694 msvc debug build
> Problem:
> java.util.Locale(String, String, String) does not throw NullPointerException when one of arguments is null.
> RI throws it.
> Java spec 1.5.0 says:
> "Throws: 
> NullPointerException - thrown if any argument is null.
> ".
> import java.util.Locale;
> public class Test {
>              public static void main(String args[]) {
>                         try  {
>                                     new Locale("aaa", "ccc", null);
>                                     System.out.println("No Exception!");
>                          } catch (NullPointerException e) { 
>                                      System.out.println("Exception thrown "+e);
>                                     e.printStackTrace();
>                          }          
>         }
> }
> Output in RI:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Exception thrown java.lang.NullPointerException
> java.lang.NullPointerException
>         at java.util.Locale.<init>(Locale.java:247)
>         at Test.main(test.java:6)
> Output in Harmony:
> No Exception!
> ---------
> The patch with JUnit test and classlib code modification that resolves this problem is attached

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

        

[jira] Commented: (HARMONY-901) java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null

Posted by "Anton Luht (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-901?page=comments#action_12422651 ] 
            
Anton Luht commented on HARMONY-901:
------------------------------------

verified on DRLVM + classlib revision 424264 msvc debug

> java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-901
>                 URL: http://issues.apache.org/jira/browse/HARMONY-901
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Nathan Beyer
>            Priority: Minor
>         Attachments: patch.txt
>
>
> VM + classlib revision 422694 msvc debug build
> Problem:
> java.util.Locale(String, String, String) does not throw NullPointerException when one of arguments is null.
> RI throws it.
> Java spec 1.5.0 says:
> "Throws: 
> NullPointerException - thrown if any argument is null.
> ".
> import java.util.Locale;
> public class Test {
>              public static void main(String args[]) {
>                         try  {
>                                     new Locale("aaa", "ccc", null);
>                                     System.out.println("No Exception!");
>                          } catch (NullPointerException e) { 
>                                      System.out.println("Exception thrown "+e);
>                                     e.printStackTrace();
>                          }          
>         }
> }
> Output in RI:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Exception thrown java.lang.NullPointerException
> java.lang.NullPointerException
>         at java.util.Locale.<init>(Locale.java:247)
>         at Test.main(test.java:6)
> Output in Harmony:
> No Exception!
> ---------
> The patch with JUnit test and classlib code modification that resolves this problem is attached

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

        

[jira] Assigned: (HARMONY-901) java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-901?page=all ]

Nathan Beyer reassigned HARMONY-901:
------------------------------------

    Assignee: Nathan Beyer

> java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-901
>                 URL: http://issues.apache.org/jira/browse/HARMONY-901
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Nathan Beyer
>            Priority: Minor
>         Attachments: patch.txt
>
>
> VM + classlib revision 422694 msvc debug build
> Problem:
> java.util.Locale(String, String, String) does not throw NullPointerException when one of arguments is null.
> RI throws it.
> Java spec 1.5.0 says:
> "Throws: 
> NullPointerException - thrown if any argument is null.
> ".
> import java.util.Locale;
> public class Test {
>              public static void main(String args[]) {
>                         try  {
>                                     new Locale("aaa", "ccc", null);
>                                     System.out.println("No Exception!");
>                          } catch (NullPointerException e) { 
>                                      System.out.println("Exception thrown "+e);
>                                     e.printStackTrace();
>                          }          
>         }
> }
> Output in RI:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Exception thrown java.lang.NullPointerException
> java.lang.NullPointerException
>         at java.util.Locale.<init>(Locale.java:247)
>         at Test.main(test.java:6)
> Output in Harmony:
> No Exception!
> ---------
> The patch with JUnit test and classlib code modification that resolves this problem is attached

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