You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "KuiLIU (JIRA)" <ji...@apache.org> on 2018/04/17 12:19:00 UTC

[jira] [Updated] (FOP-2787) Inconsistent method name "toSAX"

     [ https://issues.apache.org/jira/browse/FOP-2787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

KuiLIU updated FOP-2787:
------------------------
    Attachment: rename-method-toSAX.patch

> 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)