This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e91751ada Trivial refactor: replace `StringBuffer` with 
`StringBuilder`
3e91751ada is described below

commit 3e91751ada72351069340aa7b11bc7e02d7c1612
Author: Daniel Sun <sun...@apache.org>
AuthorDate: Sat Jun 15 07:12:56 2024 +0900

    Trivial refactor: replace `StringBuffer` with `StringBuilder`
---
 .../codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git 
a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
 
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
index 63d811dbae..19b852d887 100644
--- 
a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
+++ 
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
@@ -18,9 +18,8 @@
  */
 package org.codehaus.groovy.tools.groovydoc;
 
-import com.github.javaparser.ast.expr.Name;
 import com.github.javaparser.JavaParser;
-
+import com.github.javaparser.ast.expr.Name;
 import org.codehaus.groovy.groovydoc.GroovyAnnotationRef;
 import org.codehaus.groovy.groovydoc.GroovyClassDoc;
 import org.codehaus.groovy.groovydoc.GroovyConstructorDoc;
@@ -947,7 +946,7 @@ public class SimpleGroovyClassDoc extends 
SimpleGroovyAbstractableElementDoc imp
         Matcher matcher = regex.matcher(self);
         if (matcher.find()) {
             matcher.reset();
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             while (matcher.find()) {
                 String tagname = matcher.group(1);
                 if (!"interface".equals(tagname)) {
@@ -972,7 +971,7 @@ public class SimpleGroovyClassDoc extends 
SimpleGroovyAbstractableElementDoc imp
         if (matcher.find()) {
             matcher.reset();
             Map<String, List<String>> savedTags = new LinkedHashMap<>();
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             while (matcher.find()) {
                 String tagname = matcher.group(1);
                 if (!"interface".equals(tagname)) {
@@ -1003,7 +1002,7 @@ public class SimpleGroovyClassDoc extends 
SimpleGroovyAbstractableElementDoc imp
             }
             matcher.appendTail(sb);
             // remove @endMarker
-            sb = new StringBuffer(sb.substring(0, sb.length() - 10));
+            sb = new StringBuilder(sb.substring(0, sb.length() - 10));
             for (Map.Entry<String, List<String>> e : savedTags.entrySet()) {
                 sb.append(preKey);
                 sb.append(e.getKey());
@@ -1027,7 +1026,7 @@ public class SimpleGroovyClassDoc extends 
SimpleGroovyAbstractableElementDoc imp
         Matcher matcher = regex.matcher(text);
         if (matcher.find()) {
             matcher.reset();
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             while (matcher.find()) {
                 String tagName = matcher.group(1);
                 String tagBody = matcher.group(2);

Reply via email to