You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/07/24 07:16:16 UTC
[jira] Resolved: (HARMONY-836) RuleBasedCollator.compare(null,
null) doesn't throw NPE
[ 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