[ https://issues.apache.org/jira/browse/FOP-2787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
KuiLIU updated FOP-2787: ------------------------ Affects Version/s: trunk 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. {code:java} /** {@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); } {code} > Inconsistent method name "toSAX" > -------------------------------- > > Key: FOP-2787 > URL: https://issues.apache.org/jira/browse/FOP-2787 > Project: FOP > Issue Type: Improvement > Affects Versions: trunk > Reporter: KuiLIU > Priority: Major > Attachments: rename-method-toSAX.patch > > > 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. > {code:java} > /** {@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); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)