harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-527) [classlib][text] java.text.AttributedString.addAttribute() incorrectly handles null value.
Date Tue, 30 May 2006 08:56:29 GMT
[classlib][text] java.text.AttributedString.addAttribute() incorrectly handles null value.
------------------------------------------------------------------------------------------

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

  Components: Classlib  
    Reporter: Paulex Yang
    Priority: Trivial


java.text.AttributedString.addAttribute() should notl add attribute when its vaule is null.
 If it is fixed, the excluded org/apache/harmony/text/tests/java/text/AttributedCharacterIteratorTest.java
can be enabled.

The following tests reproduces the bug,

     public void test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII()
    {
            AttributedString as = new AttributedString("test");
            AttributedCharacterIterator it = as.getIterator();
            as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, null,
                    2, 3);
            it = as.getIterator();
            assertEquals("null value limit",
                    4, it.getRunLimit(AttributedCharacterIterator.Attribute.LANGUAGE));
    }

RI 5.0 passes this test, but Harmony fails.


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