harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Luht (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-836) RuleBasedCollator.compare(null, null) doesn't throw NPE
Date Tue, 11 Jul 2006 12:27:31 GMT
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


Mime
View raw message