#69 inconsistent postconditions in org.xml.sax.Attributes

open
nobody
javadoc (14)
1
2008-03-20
2008-03-20
Javier Godoy
No

(javadoc shipped with Java 6)

class org.xml.sax.Attributes

specification for method getValue(String qName) and getType(String qName) say they return: "(...) null (...) if the attribute is not in the list or if qualified names are not available."

However, getIndex(String qName) returns "The index of the attribute, or -1 if it does not appear in the list." It does not state that null is returned when qualified names are not available.

Suggested fix: documentation for getIndex(String qName) should say "Returns: The index of the attribute, or -1 if it does not appear in the list, or if or if qualified names are not available" (I think it is the expected behaviour).

Discussion

  • Javier Godoy
    Javier Godoy
    2008-03-20

    • labels: --> javadoc
    • priority: 5 --> 1