bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/29010] New: AttributedString checks for defined attribute


From: cam-gcc-bugzilla at aka dot mcc dot id dot au
Subject: [Bug classpath/29010] New: AttributedString checks for defined attributes incorrectly
Date: 11 Sep 2006 03:32:13 -0000

In java/text/AttributedString.java, the check to ensure an attribute is defined
on the current character:

            int rl = aci.getRunLimit(attrib);
            if (rl == -1)
              continue;

is incorrect.  According to the javadoc for AttributedCharacterIterator:

  A run with respect to an attribute is a maximum text range for which:

    * the attribute is undefined or null for the entire range, or
    * the attribute value is defined and has the same non-null value for the
      entire range.

which implies that getRunLimit(AttributedCharacterIterator.Attribute) won't
necessarily return a -1 for an attribute that is not defined, but instead the
limit of the run where it is undefined/null.


-- 
           Summary: AttributedString checks for defined attributes
                    incorrectly
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cam-gcc-bugzilla at aka dot mcc dot id dot au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29010





reply via email to

[Prev in Thread] Current Thread [Next in Thread]