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/11 14:27:31 UTC

[jira] Created: (HARMONY-836) RuleBasedCollator.compare(null, null) doesn't throw NPE

RuleBasedCollator.compare(null, null) doesn't throw NPE
-------------------------------------------------------

         Key: HARMONY-836
         URL: http://issues.apache.org/jira/browse/HARMONY-836
     Project: Harmony
        Type: Bug

  Components: Non-bug differences from RI  
 Environment: Windows XP Professional
    Reporter: Anton Luht
    Priority: Trivial


VM + classlib revision 420760

The following code

import java.text.*;

public class Test  {
  public static void main (String[] args) throws Exception {                 
    new RuleBasedCollator("< a").compare(null, null);
  } 
} 


throws NPE on RI and doesn't throw on Harmony . If one of arguments is not null, both implementations throw NPE so I believe it's better to follow RI and add NPE in case of both nulls. Please see the patch with unit test and code patch 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-836) RuleBasedCollator.compare(null, null) doesn't throw NPE

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

Paulex Yang resolved HARMONY-836.
---------------------------------

    Resolution: Fixed

Anton, patch applied at revision r424905, thanks a lot for this enhancement, please verify that the problem is fully fixed as you expected.

> RuleBasedCollator.compare(null, null) doesn't throw NPE
> -------------------------------------------------------
>
>                 Key: HARMONY-836
>                 URL: http://issues.apache.org/jira/browse/HARMONY-836
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Paulex Yang
>            Priority: Trivial
>         Attachments: patch.txt
>
>
> VM + classlib revision 420760
> The following code
> import java.text.*;
> public class Test  {
>   public static void main (String[] args) throws Exception {                 
>     new RuleBasedCollator("< a").compare(null, null);
>   } 
> } 
> throws NPE on RI and doesn't throw on Harmony . If one of arguments is not null, both implementations throw NPE so I believe it's better to follow RI and add NPE in case of both nulls. Please see the patch with unit test and code patch 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-836) RuleBasedCollator.compare(null, null) doesn't throw NPE

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

verified on 

java version "1.5.0"
pre-alpha : not complete or compatible
svn = r424964, (Jul 24 2006), Windows/ia32/msvc 1310, debug build

> RuleBasedCollator.compare(null, null) doesn't throw NPE
> -------------------------------------------------------
>
>                 Key: HARMONY-836
>                 URL: http://issues.apache.org/jira/browse/HARMONY-836
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Paulex Yang
>            Priority: Trivial
>         Attachments: patch.txt
>
>
> VM + classlib revision 420760
> The following code
> import java.text.*;
> public class Test  {
>   public static void main (String[] args) throws Exception {                 
>     new RuleBasedCollator("< a").compare(null, null);
>   } 
> } 
> throws NPE on RI and doesn't throw on Harmony . If one of arguments is not null, both implementations throw NPE so I believe it's better to follow RI and add NPE in case of both nulls. Please see the patch with unit test and code patch 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-836) RuleBasedCollator.compare(null, null) doesn't throw NPE

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

Paulex Yang closed HARMONY-836.
-------------------------------


Verified by Anton.

> RuleBasedCollator.compare(null, null) doesn't throw NPE
> -------------------------------------------------------
>
>                 Key: HARMONY-836
>                 URL: http://issues.apache.org/jira/browse/HARMONY-836
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Paulex Yang
>            Priority: Trivial
>         Attachments: patch.txt
>
>
> VM + classlib revision 420760
> The following code
> import java.text.*;
> public class Test  {
>   public static void main (String[] args) throws Exception {                 
>     new RuleBasedCollator("< a").compare(null, null);
>   } 
> } 
> throws NPE on RI and doesn't throw on Harmony . If one of arguments is not null, both implementations throw NPE so I believe it's better to follow RI and add NPE in case of both nulls. Please see the patch with unit test and code patch 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-836) RuleBasedCollator.compare(null, null) doesn't throw NPE

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

Anton Luht updated HARMONY-836:
-------------------------------

    Attachment: patch.txt

patch 

> RuleBasedCollator.compare(null, null) doesn't throw NPE
> -------------------------------------------------------
>
>          Key: HARMONY-836
>          URL: http://issues.apache.org/jira/browse/HARMONY-836
>      Project: Harmony
>         Type: Bug

>   Components: Non-bug differences from RI
>  Environment: Windows XP Professional
>     Reporter: Anton Luht
>     Priority: Trivial
>  Attachments: patch.txt
>
> VM + classlib revision 420760
> The following code
> import java.text.*;
> public class Test  {
>   public static void main (String[] args) throws Exception {                 
>     new RuleBasedCollator("< a").compare(null, null);
>   } 
> } 
> throws NPE on RI and doesn't throw on Harmony . If one of arguments is not null, both implementations throw NPE so I believe it's better to follow RI and add NPE in case of both nulls. Please see the patch with unit test and code patch 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-836) RuleBasedCollator.compare(null, null) doesn't throw NPE

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

Paulex Yang reassigned HARMONY-836:
-----------------------------------

    Assignee: Paulex Yang

> RuleBasedCollator.compare(null, null) doesn't throw NPE
> -------------------------------------------------------
>
>                 Key: HARMONY-836
>                 URL: http://issues.apache.org/jira/browse/HARMONY-836
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Paulex Yang
>            Priority: Trivial
>         Attachments: patch.txt
>
>
> VM + classlib revision 420760
> The following code
> import java.text.*;
> public class Test  {
>   public static void main (String[] args) throws Exception {                 
>     new RuleBasedCollator("< a").compare(null, null);
>   } 
> } 
> throws NPE on RI and doesn't throw on Harmony . If one of arguments is not null, both implementations throw NPE so I believe it's better to follow RI and add NPE in case of both nulls. Please see the patch with unit test and code patch 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