You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Lau Ka Ho (Jira)" <ji...@apache.org> on 2020/01/30 07:56:00 UTC

[jira] [Updated] (BCEL-332) Separate the "ElementValuePairs" in "toString" method in "org.apache.bcel.classfile.AnnotationEntry"

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

Lau Ka Ho updated BCEL-332:
---------------------------
    Issue Type: Improvement  (was: Bug)

> Separate the "ElementValuePairs" in "toString" method in "org.apache.bcel.classfile.AnnotationEntry"
> ----------------------------------------------------------------------------------------------------
>
>                 Key: BCEL-332
>                 URL: https://issues.apache.org/jira/browse/BCEL-332
>             Project: Commons BCEL
>          Issue Type: Improvement
>            Reporter: Lau Ka Ho
>            Priority: Minor
>
> [https://github.com/apache/commons-bcel/blob/master/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java#L136]
>  
> There are no *separator* in the list of elementValuePair(s).
> It could be better to separate them by a separator (i.e. comma)
> {code}public String toShortString() {
>     final StringBuilder result = new StringBuilder();
>     result.append("@");
>     result.append(getAnnotationType());
>     final ElementValuePair[] evPairs = getElementValuePairs();
>     if (evPairs.length > 0) {
>         result.append("(");
>         for (final ElementValuePair element : evPairs) {
>             result.append(element.toShortString());
>         }
>         result.append(")");
>     }
>     return result.toString();
> }{code}
> ||Before||Suggest|
> |{code}La/b/c//annotation/XXXX;(k1=v1k2=v2){code}|{code}@La/b/c//annotation/XXXX;(k1=v1,k2=v2){code}|



--
This message was sent by Atlassian Jira
(v8.3.4#803005)