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:29:30 UTC
[jira] Updated: (HARMONY-836) RuleBasedCollator.compare(null, null)
doesn't throw NPE
[ 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