Re: [PR] Replace uses of StringBuffer with StringBuilder. [xalan-java]

elharo (via GitHub) <[email protected]>
Newsgroups gmane.text.xml.xalan.devel
Message-ID <PR_kwDOCtH1F86DJAv--26ce0673-7f2e-488c-ba2c-59412672829e@gitbox.apache.org>
elharo commented on code in PR #191:
URL: https://github.com/apache/xalan-java/pull/191#discussion_r2269643599


##########
xalan/src/main/java/org/apache/xalan/xsltc/cmdline/Compile.java:
##########
@@ -45,7 +45,7 @@ public final class Compile {
  
 
     public static void printUsage() {
-        StringBuffer vers = new StringBuffer("XSLTC version " + VERSION_MAJOR
+        StringBuilder vers = new StringBuilder("XSLTC version " + VERSION_MAJOR

Review Comment:
   This one's weird. It should probably just use a String, or maybe use append, but really a String is all that's needed; neither StringBuilder nor StringBuffer is appropriate



##########
xalan/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java:
##########
@@ -1532,12 +1532,12 @@ else if (cl == Long.class)
   }
   
   /**
-   * StringBuffer containing comma delimited list of valid values for ENUM type.
+   * StringBuilder containing comma delimited list of valid values for ENUM type.
    * Used to build error message.
    */
-  private StringBuffer getListOfEnums() 
+  private StringBuilder getListOfEnums()
   {
-     StringBuffer enumNamesList = new StringBuffer();            
+      StringBuilder enumNamesList = new StringBuilder();

Review Comment:
   indentation looks off by one space



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.