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

Julian Reschke updated OAK-10796:
---------------------------------
    Component/s: commons
                     (was: indexing)

> Avoid creation of intermediate StringBuilder in JsopBuilder
> -----------------------------------------------------------
>
>                 Key: OAK-10796
>                 URL: https://issues.apache.org/jira/browse/OAK-10796
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: commons
>            Reporter: Nuno Santos
>            Priority: Minor
>              Labels: candidate_oak_1_22
>
> Since invokedynamic was added to Java, this code in the JsopBuilder class:
> {code:java}
> StringBuilder buff = new StringBuilder(length + 2);
> return buff.append('\"').append(s).append('\"').toString(); {code}
> can be written more simply and more efficiently like this:
> {code:java}
>  return '\"' + s + '\"';
> {code}
> https://www.baeldung.com/java-string-concatenation-invoke-dynamic



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to