From: Javen O'Neal Date: Fri, 10 Jun 2016 11:16:16 +0000 (+0000) Subject: findbugs: SBSC_USE_STRINGBUFFER_CONCATENATION FormulaParser.parseAsColumnQuantifier... X-Git-Tag: REL_3_15_BETA2~177 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=04f06d16e7caeafd075a85210f6fe1db9e21e2e2;p=poi.git findbugs: SBSC_USE_STRINGBUFFER_CONCATENATION FormulaParser.parseAsColumnQuantifier() concatenates strings using + in a loop git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747685 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/ss/formula/FormulaParser.java b/src/java/org/apache/poi/ss/formula/FormulaParser.java index 7919748f5c..35e6fd53ee 100644 --- a/src/java/org/apache/poi/ss/formula/FormulaParser.java +++ b/src/java/org/apache/poi/ss/formula/FormulaParser.java @@ -816,19 +816,19 @@ public final class FormulaParser { return null; } GetChar(); - String name = ""; if (look == '#') { return null; } if (look == '@') { GetChar(); } + StringBuilder name = new StringBuilder(); while (look!=']') { - name += look; + name.append(look); GetChar(); } Match(']'); - return name; + return name.toString(); } /** * Tries to parse the next as special quantifier