mirror of
https://github.com/processing/processing4.git
synced 2026-02-23 15:25:51 +01:00
Replace instances of StringBuffer with StringBuilder
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user