Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.5
-
None
-
None
-
None
Description
The method body code seems to add a new attribute to the parameter "handler".
Identifier "addSAX" should be better than "toSAX" since 'toSAX' is prone to convert one thing to another.
/** {@inheritDoc} */ public void toSAX(ContentHandler handler) throws SAXException { AttributesImpl atts = new AttributesImpl(); if (name != null && name.length() > 0) { atts.addAttribute("", ATT_NAME, ATT_NAME, "CDATA", name); } if (this.src != null) { atts.addAttribute("", ATT_SRC, ATT_SRC, "CDATA", this.src.toASCIIString()); } handler.startElement(CATEGORY, elementName, elementName, atts); handler.endElement(CATEGORY, elementName, elementName); }