diff options
author | Lars Vogel | 2019-07-05 12:08:02 +0000 |
---|---|---|
committer | Lars Vogel | 2019-07-05 12:17:15 +0000 |
commit | 7b04bd6f1021c28cd1710b1fd62af38f9ab2cbe0 (patch) | |
tree | b190760a5f1f7717731182ec4a8fa094fc1683cc | |
parent | e2276c506a466c6b90fbec847bee5464b0b84f5c (diff) | |
download | eclipse.platform.debug-7b04bd6f1021c28cd1710b1fd62af38f9ab2cbe0.tar.gz eclipse.platform.debug-7b04bd6f1021c28cd1710b1fd62af38f9ab2cbe0.tar.xz eclipse.platform.debug-7b04bd6f1021c28cd1710b1fd62af38f9ab2cbe0.zip |
Use StringBuilder in IOConsolePartitioner
Change-Id: Ie42efbe82534acbeffc5725c223df339a217642b
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java index 1c86d080f..81aac3846 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java @@ -585,7 +585,7 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum * Holds data until updateJob can be run and the document can be updated. */ private class PendingPartition { - StringBuffer text = new StringBuffer(8192); + StringBuilder text = new StringBuilder(8192); IOConsoleOutputStream stream; PendingPartition(IOConsoleOutputStream stream, String text) { @@ -637,7 +637,7 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum void processQueue() { synchronized (overflowLock) { ArrayList<PendingPartition> pendingCopy = new ArrayList<>(); - StringBuffer buffer = null; + StringBuilder buffer = null; boolean consoleClosed = false; synchronized(pendingPartitions) { pendingCopy.addAll(pendingPartitions); @@ -652,7 +652,7 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum size+= pp.text.length(); } } - buffer = new StringBuffer(size); + buffer = new StringBuilder(size); for (PendingPartition pp : pendingCopy) { if (pp != consoleClosedPartition) { buffer.append(pp.text); |