Replace instances of StringBuffer with StringBuilder

This commit is contained in:
Federico Bond
2014-08-25 00:06:32 -03:00
parent f6611eddf1
commit 768c72e4e8
26 changed files with 129 additions and 147 deletions

View File

@@ -791,15 +791,15 @@ public class JavaEditor extends Editor {
// statement is already in there, but if the user has the import
// commented out, then this will be a problem.
String[] list = Base.packageListFromClassPath(jarPath);
StringBuffer buffer = new StringBuffer();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < list.length; i++) {
buffer.append("import ");
buffer.append(list[i]);
buffer.append(".*;\n");
sb.append("import ");
sb.append(list[i]);
sb.append(".*;\n");
}
buffer.append('\n');
buffer.append(getText());
setText(buffer.toString());
sb.append('\n');
sb.append(getText());
setText(sb.toString());
setSelection(0, 0); // scroll to start
sketch.setModified(true);
}