From 04f06d16e7caeafd075a85210f6fe1db9e21e2e2 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Fri, 10 Jun 2016 11:16:16 +0000 Subject: [PATCH] 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 --- src/java/org/apache/poi/ss/formula/FormulaParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5