You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/06/02 11:22:30 UTC

[jira] Resolved: (HARMONY-527) [classlib][text] java.text.AttributedString.addAttribute() incorrectly handles null value.

     [ http://issues.apache.org/jira/browse/HARMONY-527?page=all ]
     
Mikhail Loenko resolved HARMONY-527:
------------------------------------

    Resolution: Fixed

applied in revision 411104
Paulex, please verify it resolves the issue

> [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
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: 01.Harmony527.diff
>
> 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