changeset 183:450a8546d4cf

7902306: Replacing StringBuffer with StringBuilder Tool-assisted cleanup
author dbessono
date Wed, 05 Sep 2018 15:00:50 +0100
parents cc572fa65b25
children 608c91232258
files src/com/sun/interview/ChoiceArrayQuestion.java src/com/sun/interview/FileListQuestion.java src/com/sun/interview/Interview.java src/com/sun/interview/Properties2.java src/com/sun/interview/PropertiesQuestion.java src/com/sun/interview/StringListQuestion.java src/com/sun/interview/TreeQuestion.java src/com/sun/interview/WizPrint.java src/com/sun/interview/wizard/InetAddressQuestionRenderer.java src/com/sun/interview/wizard/ListQuestionRenderer.java src/com/sun/interview/wizard/PathPanel.java src/com/sun/interview/wizard/Wizard.java src/com/sun/javatest/EditLinks.java src/com/sun/javatest/ExcludeList.java src/com/sun/javatest/HarnessHttpHandler.java src/com/sun/javatest/InterviewPropagator.java src/com/sun/javatest/LastRunInfo.java src/com/sun/javatest/Script.java src/com/sun/javatest/Status.java src/com/sun/javatest/TRT_HttpHandler.java src/com/sun/javatest/TestEnvironment.java src/com/sun/javatest/TestResult.java src/com/sun/javatest/agent/ActiveAgentPool.java src/com/sun/javatest/agent/AgentMain.java src/com/sun/javatest/agent/SocketConnection.java src/com/sun/javatest/exec/BP_TestListSubpanel.java src/com/sun/javatest/exec/CE_EnvironmentPane.java src/com/sun/javatest/exec/CE_TestsPane.java src/com/sun/javatest/exec/ChecklistBrowser.java src/com/sun/javatest/exec/ExcludeListBrowser.java src/com/sun/javatest/exec/FileType.java src/com/sun/javatest/exec/QuickStartWizard.java src/com/sun/javatest/exec/TT_BasicNode.java src/com/sun/javatest/exec/TT_TestNode.java src/com/sun/javatest/exec/TestSuiteErrorsDialog.java src/com/sun/javatest/exec/TestTreePanel.java src/com/sun/javatest/finder/HTMLTestFinder.java src/com/sun/javatest/httpd/PageGenerator.java src/com/sun/javatest/httpd/RequestHandler.java src/com/sun/javatest/httpd/httpURL.java src/com/sun/javatest/interview/KeywordsInterview.java src/com/sun/javatest/interview/SimpleInterviewParameters.java src/com/sun/javatest/logging/ErrorDialogHandler.java src/com/sun/javatest/logging/JTFormatter.java src/com/sun/javatest/logging/LogModel.java src/com/sun/javatest/moreInfo/ShowFile.java src/com/sun/javatest/report/ConfigSection.java src/com/sun/javatest/report/HTMLSection.java src/com/sun/javatest/report/ReportSettings.java src/com/sun/javatest/report/XMLReportMaker.java src/com/sun/javatest/servlets/ExcludeBrowser.java src/com/sun/javatest/servlets/ResultBrowser.java src/com/sun/javatest/tool/Command.java src/com/sun/javatest/tool/ConfigManager.java src/com/sun/javatest/tool/FocusMonitor.java src/com/sun/javatest/tool/StringFitter.java src/com/sun/javatest/tool/UIFactory.java src/com/sun/javatest/util/Debug.java src/com/sun/javatest/util/I18NResourceBundle.java src/com/sun/javatest/util/PropertyUtils.java src/com/sun/javatest/util/StringArray.java src/com/sun/jct/utils/glossarygen/Main.java src/com/sun/jct/utils/indexgen/Main.java src/com/sun/jct/utils/mapmerge/Main.java
diffstat 64 files changed, 99 insertions(+), 99 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/interview/ChoiceArrayQuestion.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/ChoiceArrayQuestion.java	Wed Sep 05 15:00:50 2018 +0100
@@ -236,7 +236,7 @@
         if (value.length != choices.length)
             throw new IllegalStateException();
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (value != null) {
             for (int i = 0; i < value.length; i++) {
                 if (value[i]) {
--- a/src/com/sun/interview/FileListQuestion.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/FileListQuestion.java	Wed Sep 05 15:00:50 2018 +0100
@@ -393,7 +393,7 @@
         int l = ff.length - 1; // allow for spaces between words
         for (File aFf : ff) l += aFf.getPath().length();
 
-        StringBuffer sb = new StringBuffer(l);
+        StringBuilder sb = new StringBuilder(l);
 
         String ff0p = ff[0].getPath();
         sb.append(ff0p);
--- a/src/com/sun/interview/Interview.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/Interview.java	Wed Sep 05 15:00:50 2018 +0100
@@ -1415,7 +1415,7 @@
             Set<Question> markersForName = e.getValue();
             if (name != null)
                 data.put(MARKERS_PREF + i + ".name", name);
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for (Question q : markersForName) {
                 if (sb.length() > 0)
                     sb.append('\n');
@@ -2555,7 +2555,7 @@
             System.err.println("WARNING: missing resource: " + key);
         }
 
-        StringBuffer sb = new StringBuffer(key);
+        StringBuilder sb = new StringBuilder(key);
         for (Object arg : args) {
             sb.append('\n');
             sb.append(Arrays.toString(args));
--- a/src/com/sun/interview/Properties2.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/Properties2.java	Wed Sep 05 15:00:50 2018 +0100
@@ -109,7 +109,7 @@
             }
 
             // Read the key
-            StringBuffer key = new StringBuffer();
+            StringBuilder key = new StringBuilder();
             while ((ch >= 0) && (ch != '=') && (ch != ':') &&
                    (ch != ' ') && (ch != '\t') && (ch != '\n') && (ch != '\r')) {
                 key.append((char)ch);
@@ -126,7 +126,7 @@
             }
 
             // Read the value
-            StringBuffer val = new StringBuffer();
+            StringBuilder val = new StringBuilder();
             while ((ch >= 0) && (ch != '\n') && (ch != '\r')) {
                 int next = 0;
                 if (ch == '\\') {
--- a/src/com/sun/interview/PropertiesQuestion.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/PropertiesQuestion.java	Wed Sep 05 15:00:50 2018 +0100
@@ -211,7 +211,7 @@
 
     @Override
     public String getStringValue() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         if (value != null) {
             String sep = System.getProperty("line.separator");
 
--- a/src/com/sun/interview/StringListQuestion.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/StringListQuestion.java	Wed Sep 05 15:00:50 2018 +0100
@@ -122,7 +122,7 @@
         if (value == null)
             return null;
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (String aValue : value) {
             if (sb.length() > 0)
                 sb.append('\n');
--- a/src/com/sun/interview/TreeQuestion.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/TreeQuestion.java	Wed Sep 05 15:00:50 2018 +0100
@@ -366,7 +366,7 @@
         int l = paths.length - 1; // allow for spaces between words
         for (String path : paths) l += path.length();
 
-        StringBuffer sb = new StringBuffer(l);
+        StringBuilder sb = new StringBuilder(l);
         sb.append(paths[0]);
         for (int i = 1; i < paths.length; i++) {
             sb.append(' ');
--- a/src/com/sun/interview/WizPrint.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/WizPrint.java	Wed Sep 05 15:00:50 2018 +0100
@@ -703,7 +703,7 @@
     private void writeResponseType(Question q) throws IOException {
         if (q instanceof ChoiceArrayQuestion) {
             ChoiceArrayQuestion cq = (ChoiceArrayQuestion)q;
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append(i18n.getString("wp.type.chooseAny"));
             String[] choices = cq.getChoices();
             for (int i = 0; i < choices.length; i++) {
@@ -715,7 +715,7 @@
         }
         else if (q instanceof ChoiceQuestion) {
             ChoiceQuestion cq = (ChoiceQuestion)q;
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append(i18n.getString("wp.type.chooseOne"));
             String[] choices = cq.getChoices();
             for (int i = 0; i < choices.length; i++) {
--- a/src/com/sun/interview/wizard/InetAddressQuestionRenderer.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/wizard/InetAddressQuestionRenderer.java	Wed Sep 05 15:00:50 2018 +0100
@@ -187,7 +187,7 @@
     protected class ValueSaver implements Runnable {
         @Override
         public void run() {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for (int i = 0; i < 4; i++) {
                 String s = fields[i].getText();
                 if (s == null || s.length() == 0)
--- a/src/com/sun/interview/wizard/ListQuestionRenderer.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/wizard/ListQuestionRenderer.java	Wed Sep 05 15:00:50 2018 +0100
@@ -233,7 +233,7 @@
             // if there are special characters write the string character at a time;
             // otherwise, write it out as is
             if (specialChars) {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 for (int i = 0; i < text.length(); i++) {
                     char c = text.charAt(i);
                     switch (c) {
--- a/src/com/sun/interview/wizard/PathPanel.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/wizard/PathPanel.java	Wed Sep 05 15:00:50 2018 +0100
@@ -202,7 +202,7 @@
                     if(selected instanceof Question)
                         return new StringSelection(((Question)selected).getSummary());
                     else if(selected instanceof List) {
-                        StringBuffer temp = new StringBuffer();
+                        StringBuilder temp = new StringBuilder();
                         for(Question q: (List<Question>)selected) {
                             temp.append(q.getSummary());
                             temp.append("\n");
--- a/src/com/sun/interview/wizard/Wizard.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/interview/wizard/Wizard.java	Wed Sep 05 15:00:50 2018 +0100
@@ -1040,7 +1040,7 @@
         @Override
         public String getDescription() {
             if (description == null) {
-                StringBuffer sb = new StringBuffer("wizard.extn");
+                StringBuilder sb = new StringBuilder("wizard.extn");
                 if (extns.length == 0)
                     sb.append(".allFiles");
                 else {
--- a/src/com/sun/javatest/EditLinks.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/EditLinks.java	Wed Sep 05 15:00:50 2018 +0100
@@ -371,7 +371,7 @@
      * Read an identifier, and lowercase it
      */
     private String scanIdentifier() throws IOException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (true) {
             if ((c >= 'a') && (c <= 'z')) {
                 buf.append((char)c);
@@ -410,7 +410,7 @@
             nextCh();
             skipSpace();
         }
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (((quote < 0) && (c != ' ') && (c != '\t') &&
                 (c != '\n') && (c != '\r') && (c != '>')) ||
                ((quote >= 0) && (c != quote))) {
--- a/src/com/sun/javatest/ExcludeList.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/ExcludeList.java	Wed Sep 05 15:00:50 2018 +0100
@@ -616,7 +616,7 @@
     }
 
     private String bugIdsToString(Entry e) {
-        StringBuffer sb = new StringBuffer(e.bugIdStrings.length*10);
+        StringBuilder sb = new StringBuilder(e.bugIdStrings.length*10);
         sb.append(e.bugIdStrings[0]);
         for (int i = 1; i < e.bugIdStrings.length; i++) {
             sb.append(',');
@@ -626,7 +626,7 @@
     }
 
     private String platformsToString(Entry e) {
-        StringBuffer sb = new StringBuffer(e.platforms.length*10);
+        StringBuilder sb = new StringBuilder(e.platforms.length*10);
         sb.append(e.platforms[0]);
         for (int i = 1; i < e.platforms.length; i++) {
             sb.append(',');
@@ -765,7 +765,7 @@
             // numbers with no embedded white-space
             skipWhite();
             TreeSet<String> s = new TreeSet<>();
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for ( ; !isEndOfLine(ch) && !isWhitespace(ch); ch = in.read()) {
                 if (ch == ',') {
                     if (sb.length() > 0) {
@@ -819,7 +819,7 @@
         private String readRest() throws IOException {
             // skip white space, then read up to the end of the line
             skipWhite();
-            StringBuffer word = new StringBuffer(80);
+            StringBuilder word = new StringBuilder(80);
             for ( ; !isEndOfLine(ch); ch = in.read())
                 word.append((char)ch);
             // skip over terminating character
@@ -829,7 +829,7 @@
 
         private String readWord() throws IOException {
             // read characters up to the next white space
-            StringBuffer word = new StringBuffer(32);
+            StringBuilder word = new StringBuilder(32);
             for ( ; !isEndOfLine(ch) && !isWhitespace(ch); ch = in.read())
                 word.append((char)ch);
             return word.toString();
--- a/src/com/sun/javatest/HarnessHttpHandler.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/HarnessHttpHandler.java	Wed Sep 05 15:00:50 2018 +0100
@@ -533,7 +533,7 @@
 
         out.println("<Table Border>");
 
-        StringBuffer buf = new StringBuffer(50);
+        StringBuilder buf = new StringBuilder(50);
 
         // write the table header
         buf.append("<tr><th>");
--- a/src/com/sun/javatest/InterviewPropagator.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/InterviewPropagator.java	Wed Sep 05 15:00:50 2018 +0100
@@ -716,7 +716,7 @@
         private String getCSS() {
             BufferedReader r = null;
             try {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
 
                 InputStream is = ResourceLoader.getResourceAsStream(PROP_STYLESHEET, getClass());
                 if (is == null) {
--- a/src/com/sun/javatest/LastRunInfo.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/LastRunInfo.java	Wed Sep 05 15:00:50 2018 +0100
@@ -140,7 +140,7 @@
         if (list == null) {
             return "";
         }
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (String s : list) {
             sb.append(s);
             sb.append(SEP);
--- a/src/com/sun/javatest/Script.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/Script.java	Wed Sep 05 15:00:50 2018 +0100
@@ -1120,7 +1120,7 @@
     protected String[] exclude(String[] args, String... testCases) {
         if (testCases == null)
             return args;
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < testCases.length; i++) {
             if (i > 0)
                 sb.append(",");
--- a/src/com/sun/javatest/Status.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/Status.java	Wed Sep 05 15:00:50 2018 +0100
@@ -352,7 +352,7 @@
             return msg;
         }
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         boolean needWhite = false;
         for (int i = 0; i < msg.length(); i++) {
             char ch = msg.charAt(i);
@@ -432,7 +432,7 @@
         if (isAscii) {
             return str; // no need to decode;
         }
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(ENC_PREFFIX);
         for (int i = 0; i < str.length(); i++) {
             sb.append(encodeChar(str.charAt(i)));
@@ -464,7 +464,7 @@
         String encoded = str.substring(ind + ENC_PREFFIX.length(),
                 str.length() - ENC_SUFFFIX.length());
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(str.substring(0, ind));
 
         // emulate StringTokenizer(encoded, ENC_SEPARATOR) to find tokens
--- a/src/com/sun/javatest/TRT_HttpHandler.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/TRT_HttpHandler.java	Wed Sep 05 15:00:50 2018 +0100
@@ -122,7 +122,7 @@
 
         out.println("<Table Border>");
 
-        StringBuffer buf = new StringBuffer(50);
+        StringBuilder buf = new StringBuilder(50);
 
         // write the table header
         buf.append("<tr><th>");
--- a/src/com/sun/javatest/TestEnvironment.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/TestEnvironment.java	Wed Sep 05 15:00:50 2018 +0100
@@ -376,7 +376,7 @@
 
     private String[] resolve(String s, Vector<String> activeKeys) throws Fault {
         Vector<String> v = new Vector<>();
-        StringBuffer current = new StringBuffer(64);
+        StringBuilder current = new StringBuilder(64);
         char term = 0;
 
   loop:
--- a/src/com/sun/javatest/TestResult.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/TestResult.java	Wed Sep 05 15:00:50 2018 +0100
@@ -614,7 +614,7 @@
                         throw new ReloadFault(i18n, "rslt.badHeaderVersion", e);
                     }
 
-                    StringBuffer buff = new StringBuffer(chars);
+                    StringBuilder buff = new StringBuilder(chars);
 
                     if (needsEscape) {
                         for (int i = 0; i < chars; i++) {
@@ -1275,7 +1275,7 @@
      *         given URL is null.
      */
     public static String getWorkRelativePath(String baseURL, String testId) {
-        StringBuffer sb = new StringBuffer(baseURL);
+        StringBuilder sb = new StringBuilder(baseURL);
 
         // strip off extension
     stripExtn:
@@ -2178,14 +2178,14 @@
     private Section processOldSection(String line1, BufferedReader in)
         throws ReloadFault, IOException
     {
-        StringBuffer sb = new StringBuffer();         // message stream
+        StringBuilder sb = new StringBuilder();         // message stream
         Section section = null;
         String line = line1;
         while (!(line == null)) {
             if (line.startsWith("----------")) {
                 String streamName = null;
                 String sectionName = null;
-                StringBuffer buff = new StringBuffer();
+                StringBuilder buff = new StringBuilder();
                 int lines = 0;
                 int chars = 0;
                 try {
--- a/src/com/sun/javatest/agent/ActiveAgentPool.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/agent/ActiveAgentPool.java	Wed Sep 05 15:00:50 2018 +0100
@@ -92,7 +92,7 @@
         @Override
         public String getName() {
             if (name == null) {
-                StringBuffer sb = new StringBuffer(32);
+                StringBuilder sb = new StringBuilder(32);
                 sb.append(socket.getInetAddress().getHostName());
                 sb.append(",port=");
                 sb.append(socket.getPort());
--- a/src/com/sun/javatest/agent/AgentMain.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/agent/AgentMain.java	Wed Sep 05 15:00:50 2018 +0100
@@ -148,8 +148,8 @@
 
         if (Boolean.getBoolean("javatest.trace.printargs") &&
             args != null && args.length > 0) {
-            StringBuffer fullCmd = new StringBuffer();
-            StringBuffer incrementalCmd = new StringBuffer();
+            StringBuilder fullCmd = new StringBuilder();
+            StringBuilder incrementalCmd = new StringBuilder();
 
             for (String arg : args) {
                 fullCmd.append(arg);
--- a/src/com/sun/javatest/agent/SocketConnection.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/agent/SocketConnection.java	Wed Sep 05 15:00:50 2018 +0100
@@ -103,7 +103,7 @@
     @Override
     public String getName() {
         if (name == null) {
-            StringBuffer sb = new StringBuffer(32);
+            StringBuilder sb = new StringBuilder(32);
             sb.append(getHostName(socket.getInetAddress()));
             sb.append(",port=");
             sb.append(socket.getPort());
--- a/src/com/sun/javatest/exec/BP_TestListSubpanel.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/BP_TestListSubpanel.java	Wed Sep 05 15:00:50 2018 +0100
@@ -546,7 +546,7 @@
                     if (s.length == 0)
                         return uif.getI18NString("br.list.noKeywords.txt");
                     else {
-                        StringBuffer sb = new StringBuffer();
+                        StringBuilder sb = new StringBuilder();
                         for (String value : s) {
                             sb.append(value);
                             sb.append(" ");
--- a/src/com/sun/javatest/exec/CE_EnvironmentPane.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/CE_EnvironmentPane.java	Wed Sep 05 15:00:50 2018 +0100
@@ -238,7 +238,7 @@
                 return new File(canonFilePath.substring(canonTSDPath.length() + 1));
             }
 
-            StringBuffer prefix = new StringBuffer();
+            StringBuilder prefix = new StringBuilder();
             int spIndex;
             String cp = canonTSDPath;
             while ((spIndex = cp.lastIndexOf(File.separatorChar)) != -1) {
--- a/src/com/sun/javatest/exec/CE_TestsPane.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/CE_TestsPane.java	Wed Sep 05 15:00:50 2018 +0100
@@ -246,7 +246,7 @@
             if (badPaths.size() == 1)
                 uif.showError("ce.tests.badPath", badPaths.get(0));
             else {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 for (int i = 0; i < Math.min(badPaths.size(), MAX_BAD_PATHS); i++) {
                     if (sb.length() > 0)
                         sb.append('\n');
--- a/src/com/sun/javatest/exec/ChecklistBrowser.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/ChecklistBrowser.java	Wed Sep 05 15:00:50 2018 +0100
@@ -162,7 +162,7 @@
         for (int i = 0; i < s.length(); i++) {
             switch (s.charAt(i)) {
             case '<': case '>': case '&':
-                StringBuffer sb = new StringBuffer(s.length()*2);
+                StringBuilder sb = new StringBuilder(s.length()*2);
                 for (int j = 0; j < s.length(); j++) {
                     char c = s.charAt(j);
                     switch (c) {
--- a/src/com/sun/javatest/exec/ExcludeListBrowser.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/ExcludeListBrowser.java	Wed Sep 05 15:00:50 2018 +0100
@@ -212,7 +212,7 @@
 
     private String getBugIds(ExcludeList.Entry e) {
         String[] bugIds = e.getBugIdStrings();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < bugIds.length; i++) {
             if (i > 0)
                 sb.append(", ");
@@ -223,7 +223,7 @@
 
     private String getKeywords(ExcludeList.Entry e) {
         String[] keywords = e.getPlatforms();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < keywords.length; i++) {
             if (i > 0)
                 sb.append(", ");
--- a/src/com/sun/javatest/exec/FileType.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/FileType.java	Wed Sep 05 15:00:50 2018 +0100
@@ -46,7 +46,7 @@
     @Override
     public String getDescription() {
         if (desc == null) {
-            StringBuffer sb = new StringBuffer("filetype");
+            StringBuilder sb = new StringBuilder("filetype");
             if (extns == null)
                 sb.append(".allFiles");
             else {
--- a/src/com/sun/javatest/exec/QuickStartWizard.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/QuickStartWizard.java	Wed Sep 05 15:00:50 2018 +0100
@@ -1267,7 +1267,7 @@
             // set configCheck if config incomplete
             Integer haveConfig = Integer.valueOf(configData == null ? 0 : 1);
 
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             if (config.isFinishable()) {
                 // "Your configuration is complete, but you can change it by using
                 // the Configuration Editor."
--- a/src/com/sun/javatest/exec/TT_BasicNode.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/TT_BasicNode.java	Wed Sep 05 15:00:50 2018 +0100
@@ -175,7 +175,7 @@
         {
             return null;
         }
-        StringBuffer sb = new StringBuffer(getShortName());
+        StringBuilder sb = new StringBuilder(getShortName());
         TT_BasicNode spot = parent;
         while (spot.parent != null) {
             sb.insert(0, "/");
--- a/src/com/sun/javatest/exec/TT_TestNode.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/TT_TestNode.java	Wed Sep 05 15:00:50 2018 +0100
@@ -127,7 +127,7 @@
         {
             return null;
         }
-        StringBuffer sb = new StringBuffer(getShortName());
+        StringBuilder sb = new StringBuilder(getShortName());
         TT_BasicNode spot = parent;
         while (spot != null && !spot.isRoot()) {
             sb.insert(0, "/");
--- a/src/com/sun/javatest/exec/TestSuiteErrorsDialog.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/TestSuiteErrorsDialog.java	Wed Sep 05 15:00:50 2018 +0100
@@ -48,7 +48,7 @@
     public void show(TestSuite ts) {
         testSuite = ts;
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("<html><body style=\"font-family: SansSerif; font-size: 12pt\">");
 
         if (testSuite == null)
@@ -106,7 +106,7 @@
         for (int i = 0; i < s.length(); i++) {
             switch (s.charAt(i)) {
             case '<': case '>': case '&':
-                StringBuffer sb = new StringBuffer(s.length()*2);
+                StringBuilder sb = new StringBuilder(s.length()*2);
                 for (int j = 0; j < s.length(); j++) {
                     char c = s.charAt(j);
                     switch (c) {
--- a/src/com/sun/javatest/exec/TestTreePanel.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/exec/TestTreePanel.java	Wed Sep 05 15:00:50 2018 +0100
@@ -595,7 +595,7 @@
 
     // XXX need to find a shared place for these two methods to live
     static String createNodeListString(String... items) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         for (int i = 0; i < items.length; i++) {
             sb.append("      ");
--- a/src/com/sun/javatest/finder/HTMLTestFinder.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/finder/HTMLTestFinder.java	Wed Sep 05 15:00:50 2018 +0100
@@ -458,7 +458,7 @@
     // general lexical support
 
     private String scanIdentifier() throws IOException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (true) {
             if ((c >= 'a') && (c <= 'z')) {
                 buf.append((char)c);
@@ -532,7 +532,7 @@
             nextCh();
             skipSpace();
         }
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (((quote < 0) && (c != ' ') && (c != '\t') &&
                 (c != '\n') && (c != '\r') && (c != '>')) ||
                ((quote >= 0) && (c != quote))) {
--- a/src/com/sun/javatest/httpd/PageGenerator.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/httpd/PageGenerator.java	Wed Sep 05 15:00:50 2018 +0100
@@ -130,7 +130,7 @@
 
         out.println("<Table Border>");
 
-        StringBuffer buf = new StringBuffer(50);
+        StringBuilder buf = new StringBuilder(50);
 
         // write the table header
         buf.append("<tr><th>");
--- a/src/com/sun/javatest/httpd/RequestHandler.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/httpd/RequestHandler.java	Wed Sep 05 15:00:50 2018 +0100
@@ -61,7 +61,7 @@
 
         try {
             if (debug) {
-                StringBuffer buf = new StringBuffer();
+                StringBuilder buf = new StringBuilder();
                 buf.append("Handling request from ");
                 buf.append(soc.getInetAddress().getHostName());
                 buf.append(" (");
--- a/src/com/sun/javatest/httpd/httpURL.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/httpd/httpURL.java	Wed Sep 05 15:00:50 2018 +0100
@@ -187,7 +187,7 @@
         if (path == null || path.length == 0)
             return "";
 
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
 
         if (leadingSlash) result.append("/");
 
@@ -256,7 +256,7 @@
     }
 
     private String readSegment(String data, int position, int dataLen) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         int i = position;
 
         // loop until you hit end of string, a & or a =
--- a/src/com/sun/javatest/interview/KeywordsInterview.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/interview/KeywordsInterview.java	Wed Sep 05 15:00:50 2018 +0100
@@ -242,7 +242,7 @@
                 return null;
 
             String[] keys = StringArray.split(list);
-            StringBuffer sb = new StringBuffer(list.length());
+            StringBuilder sb = new StringBuilder(list.length());
             for (int i = 0; i < keys.length; i++) {
                 if (i > 0)
                     sb.append(op);
--- a/src/com/sun/javatest/interview/SimpleInterviewParameters.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/interview/SimpleInterviewParameters.java	Wed Sep 05 15:00:50 2018 +0100
@@ -233,7 +233,7 @@
         char fs = File.separatorChar;
         char ps = File.pathSeparatorChar;
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("com.sun.javatest.lib.ExecStdTestOtherJVMCmd ");
         File jvm = qJVM.getValue();
         sb.append(jvm == null ? "unknown_jvm" : jvm.getPath());
--- a/src/com/sun/javatest/logging/ErrorDialogHandler.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/logging/ErrorDialogHandler.java	Wed Sep 05 15:00:50 2018 +0100
@@ -55,7 +55,7 @@
 
     @Override
     public synchronized void publish(LogRecord record) {
-        StringBuffer args = new StringBuffer(record.getMessage());
+        StringBuilder args = new StringBuilder(record.getMessage());
 
         argsToArr[0] = args.toString();
 
@@ -102,7 +102,7 @@
 
 
         // setup output string
-        StringBuffer traceString = new StringBuffer();
+        StringBuilder traceString = new StringBuilder();
         for (String arg : args) {
             traceString.append(arg);
             traceString.append("\n");
--- a/src/com/sun/javatest/logging/JTFormatter.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/logging/JTFormatter.java	Wed Sep 05 15:00:50 2018 +0100
@@ -41,8 +41,8 @@
 
     @Override
     public String format(LogRecord record) {
-        StringBuffer sb = new StringBuffer();
-        StringBuffer msgBuf = new StringBuffer(record.getMessage());
+        StringBuilder sb = new StringBuilder();
+        StringBuilder msgBuf = new StringBuilder(record.getMessage());
 
         if (record.getThrown() != null) {
             // Report on the state of the throwable.
--- a/src/com/sun/javatest/logging/LogModel.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/logging/LogModel.java	Wed Sep 05 15:00:50 2018 +0100
@@ -188,7 +188,7 @@
                         // 5) Msg
                         long read = 0;
                         long start = r.getFilePointer();
-                        StringBuffer msg = new StringBuffer();
+                        StringBuilder msg = new StringBuilder();
 
                         // Do not optimize this loop, do not use readLine() !
                         while (read <= length) {
@@ -305,7 +305,7 @@
             return messageCache.get(rec);
         }
 
-        StringBuffer msg = new StringBuffer();
+        StringBuilder msg = new StringBuilder();
         try {
             ensureMirrorFileOpened();
             if (rec == null ||  mirrorFile == null) {
@@ -472,7 +472,7 @@
         }
 
         public String getHeader(String logName) {
-            StringBuffer out = new StringBuffer();
+            StringBuilder out = new StringBuilder();
             int pos = logName.indexOf("#");
             if (pos >= 0) {
                 out.append(logName.substring(pos+1));
--- a/src/com/sun/javatest/moreInfo/ShowFile.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/moreInfo/ShowFile.java	Wed Sep 05 15:00:50 2018 +0100
@@ -251,7 +251,7 @@
             URL base = ((HTMLDocument) d).getBase();
             URL p = new URL(base, path);
             BufferedReader r = new BufferedReader(new InputStreamReader(p.openStream()));
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             char[] buf = new char[1024];
             int n;
             while ((n = r.read(buf, 0, buf.length)) != -1)
--- a/src/com/sun/javatest/report/ConfigSection.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/report/ConfigSection.java	Wed Sep 05 15:00:50 2018 +0100
@@ -184,7 +184,7 @@
                             i18n.getString("config.status.error"),
                             i18n.getString("config.status.notRun") };
 
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
 
             for (int i = 0; i < b.length; i++) {
                 if (b[i]) {
--- a/src/com/sun/javatest/report/HTMLSection.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/report/HTMLSection.java	Wed Sep 05 15:00:50 2018 +0100
@@ -62,7 +62,7 @@
         if (reportDirPath.startsWith(workPath)) {
             // since reportFile is in reportDir, reset path to be relative
             File d = reportDir;
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             try {
                 while (d != null && !d.getCanonicalPath().equals(workDirRoot.getCanonicalPath())) {
                     sb.append("../");
--- a/src/com/sun/javatest/report/ReportSettings.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/report/ReportSettings.java	Wed Sep 05 15:00:50 2018 +0100
@@ -118,7 +118,7 @@
 
         // html state files
         // encoded as a comma sep. list
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < stateFiles.length; i++) {
             sb.append(Boolean.toString(stateFiles[i]));
             if (i + 1 < stateFiles.length) {
--- a/src/com/sun/javatest/report/XMLReportMaker.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/report/XMLReportMaker.java	Wed Sep 05 15:00:50 2018 +0100
@@ -499,7 +499,7 @@
     }
 
     public static String convertProhibitedChars(String cdata) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char [] data = cdata.toCharArray();
         for (char aData : data) {
             if (prohibited(aData)) {
--- a/src/com/sun/javatest/servlets/ExcludeBrowser.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/servlets/ExcludeBrowser.java	Wed Sep 05 15:00:50 2018 +0100
@@ -77,7 +77,7 @@
             for (Iterator<?> iter = excludeList.getIterator(false); iter.hasNext(); ) {
                 ExcludeList.Entry entry = (ExcludeList.Entry) iter.next();
                 String[] bugIds = entry.getBugIdStrings();
-                StringBuffer bugIdText = new StringBuffer();
+                StringBuilder bugIdText = new StringBuilder();
                 for (int i = 0; i < bugIds.length; i++) {
                     if (i > 0)
                         bugIdText.append(" ");
--- a/src/com/sun/javatest/servlets/ResultBrowser.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/servlets/ResultBrowser.java	Wed Sep 05 15:00:50 2018 +0100
@@ -230,7 +230,7 @@
         if (s.indexOf('<') == -1 && s.indexOf('>') == -1 && (!newlines || (s.indexOf('\n') == -1)))
             return s;
         else {
-            StringBuffer sb = new StringBuffer(s.length() * 2);
+            StringBuilder sb = new StringBuilder(s.length() * 2);
             for (int i = 0; i < s.length(); i++) {
                 char c;
                 switch (c = s.charAt(i)) {
--- a/src/com/sun/javatest/tool/Command.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/tool/Command.java	Wed Sep 05 15:00:50 2018 +0100
@@ -154,7 +154,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < args.size(); i++) {
             if (sb.length() > 0)
                 sb.append(' ');
--- a/src/com/sun/javatest/tool/ConfigManager.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/tool/ConfigManager.java	Wed Sep 05 15:00:50 2018 +0100
@@ -950,7 +950,7 @@
 
         private static String getPathTrace(Question... path) {
             String lineSep = System.getProperty("line.separator");
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for (Question q : path) {
                 sb.append(q.getTag());
                 if (!(q instanceof NullQuestion)) {
--- a/src/com/sun/javatest/tool/FocusMonitor.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/tool/FocusMonitor.java	Wed Sep 05 15:00:50 2018 +0100
@@ -396,7 +396,7 @@
             return null;
 
         Set<AWTKeyStroke> s = c.getFocusTraversalKeys(mode);
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (AWTKeyStroke value : s) {
             if (sb.length() > 0)
                 sb.append(", ");
--- a/src/com/sun/javatest/tool/StringFitter.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/tool/StringFitter.java	Wed Sep 05 15:00:50 2018 +0100
@@ -392,7 +392,7 @@
         int begI = 0, endI = parts.length - 1;
         // beg, end - size of result string at beginning, ending
         int beg = fm.stringWidth(parts[begI]) + splitWidth, end = fm.stringWidth(parts[endI]) + splitWidth;
-        StringBuffer begS = new StringBuffer(parts[begI]).append(splitString), endS = new StringBuffer(splitString).append(parts[endI]);
+        StringBuilder begS = new StringBuilder(parts[begI]).append(splitString), endS = new StringBuilder(splitString).append(parts[endI]);
         while(beg + end <= width) {
             while(beg <= end && beg + end <= width) {
                 begI++;
--- a/src/com/sun/javatest/tool/UIFactory.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/tool/UIFactory.java	Wed Sep 05 15:00:50 2018 +0100
@@ -2768,7 +2768,7 @@
     public void showError(String uiKey, Object[] args, Object... trace) {
         String title = local_i18n.getString("uif.error", ProductInfo.getName());
         JButton okBtn = createOptionButton("uif.ok");
-        StringBuffer traceString = new StringBuffer(getI18NString(uiKey + ".err", args));
+        StringBuilder traceString = new StringBuilder(getI18NString(uiKey + ".err", args));
         traceString.append(":\n");
         for (int i = 0; i < trace.length; i++) {
             traceString.append(trace[i]);
--- a/src/com/sun/javatest/util/Debug.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/util/Debug.java	Wed Sep 05 15:00:50 2018 +0100
@@ -162,7 +162,7 @@
         if (!masterSwitch)
             return false;
 
-        StringBuffer buf = new StringBuffer(getName(c));
+        StringBuilder buf = new StringBuilder(getName(c));
         if (suffix != null && suffix.length() != 0) {
             buf.append(Debug.SEPARATOR);
             buf.append(suffix);
@@ -230,7 +230,7 @@
         if (!masterSwitch || c == null)
             return 0;
 
-        StringBuffer buf = new StringBuffer(getName(c));
+        StringBuilder buf = new StringBuilder(getName(c));
         if (suffix != null && suffix.length() != 0) {
             buf.append(Debug.SEPARATOR);
             buf.append(suffix);
--- a/src/com/sun/javatest/util/I18NResourceBundle.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/util/I18NResourceBundle.java	Wed Sep 05 15:00:50 2018 +0100
@@ -85,7 +85,7 @@
         }
         catch (MissingResourceException e) {
             System.err.println("WARNING: missing resource: " + key + " for " + name);
-            StringBuffer sb = new StringBuffer(key);
+            StringBuilder sb = new StringBuilder(key);
             for (Object arg : args) {
                 sb.append('\n');
                 sb.append(arg.toString());
--- a/src/com/sun/javatest/util/PropertyUtils.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/util/PropertyUtils.java	Wed Sep 05 15:00:50 2018 +0100
@@ -172,8 +172,8 @@
 
 //               key=value
 //               start by reading the key; stop at newline (unless escaped in value)
-                StringBuffer key = new StringBuffer();
-                StringBuffer val = new StringBuffer();
+                StringBuilder key = new StringBuilder();
+                StringBuilder val = new StringBuilder();
 
                 boolean hasSep = false;
                 boolean precedingBackslash = false;
@@ -325,7 +325,7 @@
         if (bufLen < 0) {
             bufLen = Integer.MAX_VALUE;
         }
-        StringBuffer outBuffer = new StringBuffer(bufLen);
+        StringBuilder outBuffer = new StringBuilder(bufLen);
 
         for(int x=0; x<len; x++) {
             char aChar = theString.charAt(x);
--- a/src/com/sun/javatest/util/StringArray.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/javatest/util/StringArray.java	Wed Sep 05 15:00:50 2018 +0100
@@ -104,7 +104,7 @@
         int l = (ss.length - 1) * sep.length();
         for (String s : ss) l += s == null ? 0 : s.length();
 
-        StringBuffer sb = new StringBuffer(l);
+        StringBuilder sb = new StringBuilder(l);
         sb.append(ss[0]);
         for (int i = 1; i < ss.length; i++) {
             sb.append(sep);
--- a/src/com/sun/jct/utils/glossarygen/Main.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/jct/utils/glossarygen/Main.java	Wed Sep 05 15:00:50 2018 +0100
@@ -349,7 +349,7 @@
     }
 
     private static String getTarget(String key) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("glossary.");
         boolean needUpper = false;
         for (int i = 0; i < key.length(); i++) {
@@ -815,7 +815,7 @@
      * Read an identifier, and lowercase it
      */
     private String scanIdentifier() throws IOException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (true) {
             if ((c >= 'a') && (c <= 'z')) {
                 buf.append((char)c);
@@ -853,7 +853,7 @@
             nextCh();
             skipSpace();
         }
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (((quote < 0) && (c != ' ') && (c != '\t') &&
                 (c != '\n') && (c != '\r') && (c != '>')) ||
                ((quote >= 0) && (c != quote))) {
@@ -875,7 +875,7 @@
     private void skipComment() throws IOException {
         // a comment sequence is "<!--" ... "-->"
         // at the time this is called, "<!--" has been read;
-        StringBuffer text = new StringBuffer("<!--");
+        StringBuilder text = new StringBuilder("<!--");
         int numHyphens = 0;
         while (c != -1 && (numHyphens < 2 || c != '>')) {
             if (c == '-')
@@ -963,7 +963,7 @@
         for (int i = 0; i < s.length(); i++) {
             switch (s.charAt(i)) {
             case '<': case '>': case '&':
-                StringBuffer sb = new StringBuffer(s.length()*2);
+                StringBuilder sb = new StringBuilder(s.length()*2);
                 for (int j = 0; j < s.length(); j++) {
                     char c = s.charAt(j);
                     switch (c) {
--- a/src/com/sun/jct/utils/indexgen/Main.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/jct/utils/indexgen/Main.java	Wed Sep 05 15:00:50 2018 +0100
@@ -336,7 +336,7 @@
      * Read an identifier, and lowercase it
      */
     private String scanIdentifier() throws IOException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (true) {
             if ((c >= 'a') && (c <= 'z')) {
                 buf.append((char)c);
@@ -374,7 +374,7 @@
             nextCh();
             skipSpace();
         }
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (((quote < 0) && (c != ' ') && (c != '\t') &&
                 (c != '\n') && (c != '\r') && (c != '>')) ||
                ((quote >= 0) && (c != quote))) {
@@ -396,7 +396,7 @@
     private void scanComment() throws IOException {
         // a comment sequence is "<!--" ... "-->"
         // at the time this is called, "<!--" has been read;
-        StringBuffer text = new StringBuffer("<!--");
+        StringBuilder text = new StringBuilder("<!--");
         int numHyphens = 0;
         while (c != -1 && (numHyphens < 2 || c != '>')) {
             if (c == '-')
@@ -455,7 +455,7 @@
         for (int i = 0; i < s.length(); i++) {
             switch (s.charAt(i)) {
             case '<': case '>': case '&':
-                StringBuffer sb = new StringBuffer(s.length()*2);
+                StringBuilder sb = new StringBuilder(s.length()*2);
                 for (int j = 0; j < s.length(); j++) {
                     char c = s.charAt(j);
                     switch (c) {
@@ -669,7 +669,7 @@
         else
             key = file + "#" + ref;
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("index.");
         boolean needUpper = false;
         for (int i = 0; i < key.length(); i++) {
@@ -698,7 +698,7 @@
         // if there are special characters rewrite the string with escaped characters
         // otherwise, return it as is
         if (specialChars) {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for (int i = 0; i < text.length(); i++) {
                 char c = text.charAt(i);
                 switch (c) {
--- a/src/com/sun/jct/utils/mapmerge/Main.java	Wed Sep 05 14:39:17 2018 +0100
+++ b/src/com/sun/jct/utils/mapmerge/Main.java	Wed Sep 05 15:00:50 2018 +0100
@@ -289,7 +289,7 @@
      * Read an identifier
      */
     private String scanIdentifier() throws IOException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (true) {
             if ((c >= 'a') && (c <= 'z')) {
                 buf.append((char)c);
@@ -327,7 +327,7 @@
             nextCh();
             skipSpace();
         }
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (((quote < 0) && (c != ' ') && (c != '\t') &&
                 (c != '\n') && (c != '\r') && (c != '>')) ||
                ((quote >= 0) && (c != quote))) {