Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java16
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java2
-rw-r--r--org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java2
6 files changed, 16 insertions, 16 deletions
diff --git a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
index 1e6109ae0..225442675 100644
--- a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
+++ b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
@@ -787,7 +787,7 @@ public class PDAVirtualMachine {
}
}
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (Iterator<String> itr = children.iterator(); itr.hasNext();) {
result.append(itr.next());
result.append('|');
@@ -813,7 +813,7 @@ public class PDAVirtualMachine {
return;
}
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (Iterator<?> itr = thread.fStack.iterator(); itr.hasNext();) {
result.append(itr.next());
result.append('|');
@@ -868,7 +868,7 @@ public class PDAVirtualMachine {
System.arraycopy(fCode, 0, thread.fThreadCode, 0, fCode.length);
for (int i = 0; i < numEvalLines; i++) {
String line = tokenizer.nextToken();
- StringBuffer lineBuf = new StringBuffer(line.length());
+ StringBuilder lineBuf = new StringBuilder(line.length());
Matcher matcher = fPackPattern.matcher(line);
int lastMatchEnd = 0;
while (matcher.find()) {
@@ -938,7 +938,7 @@ public class PDAVirtualMachine {
Register reg = itr.next();
groups.add(reg.fGroup);
}
- StringBuffer response = new StringBuffer();
+ StringBuilder response = new StringBuilder();
for (Iterator<String> itr = groups.iterator(); itr.hasNext();) {
response.append(itr.next());
response.append('|');
@@ -973,7 +973,7 @@ public class PDAVirtualMachine {
void debugRegisters(Args args) {
String group = args.getNextStringArg();
- StringBuffer response = new StringBuffer();
+ StringBuilder response = new StringBuilder();
for (Iterator<Register> itr = fRegisters.values().iterator(); itr.hasNext();) {
Register reg = itr.next();
if (group.equals(reg.fGroup)) {
@@ -1102,7 +1102,7 @@ public class PDAVirtualMachine {
return;
}
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (Iterator<Frame> itr = thread.fFrames.iterator(); itr.hasNext();) {
Frame frame = itr.next();
@@ -1129,7 +1129,7 @@ public class PDAVirtualMachine {
* filename | line number | function name | var | var | var | var ...
*/
private String printFrame(Frame frame) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(fFilename);
buf.append('|');
buf.append(frame.fPC);
@@ -1234,7 +1234,7 @@ public class PDAVirtualMachine {
}
void debugThreads() {
- StringBuffer response = new StringBuffer();
+ StringBuilder response = new StringBuilder();
for (Iterator<Integer> itr = fThreads.keySet().iterator(); itr.hasNext();) {
response.append(itr.next());
response.append(' ');
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java
index 5a482ef2a..cda535c5a 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java
@@ -37,7 +37,7 @@ public abstract class TimeControl extends SequencerControl {
int sec = (int) (position / 1000000);
int min = sec / 60;
sec = sec % 60;
- StringBuffer clock = new StringBuffer();
+ StringBuilder clock = new StringBuilder();
clock.append(min);
while (clock.length() < 2) {
clock.insert(0, 0);
diff --git a/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java b/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java
index 483e9ec72..96ac52442 100644
--- a/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java
+++ b/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java
@@ -114,7 +114,7 @@ public class PreProcessor extends Task {
if (!fDestDir.exists()) {
throw new BuildException("destdir does not exist: " + fDestDir.getAbsolutePath()); //$NON-NLS-1$
}
- StringBuffer buf = new StringBuffer("Symbols: "); //$NON-NLS-1$
+ StringBuilder buf = new StringBuilder("Symbols: "); //$NON-NLS-1$
String[] symbols = fSymbols.toArray(new String[fSymbols.size()]);
for (int i = 0; i < symbols.length; i++) {
String symbol = symbols[i];
@@ -182,7 +182,7 @@ public class PreProcessor extends Task {
public String preProcessFile(File srcFile, String strip) {
try {
boolean changed = false;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
try (FileReader fileReader = new FileReader(srcFile); BufferedReader reader = new BufferedReader(fileReader)) {
String line = reader.readLine();
String activeSymbol = null;
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
index 39f3a4a8f..47b088724 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
@@ -38,7 +38,7 @@ public class MidiEventLabelProvider extends ElementLabelProvider {
return Long.toString(event.getTick());
} else if (TrackColumnPresentation.COL_BYTES.equals(columnId)) {
byte[] bytes = message.getMessage();
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < message.getLength(); i++) {
buffer.append(' ');
appendByte(buffer, bytes[i]);
@@ -47,7 +47,7 @@ public class MidiEventLabelProvider extends ElementLabelProvider {
} else if (TrackColumnPresentation.COL_COMMAND.equals(columnId)) {
if (message instanceof ShortMessage) {
ShortMessage sm = (ShortMessage) message;
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
appendByte(buf, (byte)sm.getCommand());
return buf.toString();
}
@@ -76,7 +76,7 @@ public class MidiEventLabelProvider extends ElementLabelProvider {
* @param buffer
* @param b
*/
- private void appendByte(StringBuffer buffer, byte b) {
+ private void appendByte(StringBuilder buffer, byte b) {
String hex = Integer.toHexString(b & 0xFF).toUpperCase();
for (int i = hex.length(); i < 2; i++) {
buffer.append('0');
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
index a1b854795..fd6b60f7a 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
@@ -39,7 +39,7 @@ public class TrackLabelProvider extends ElementLabelProvider {
break;
}
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("Track "); //$NON-NLS-1$
buf.append(i);
buf.append(" ["); //$NON-NLS-1$
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
index 5a95dca64..4325e8fd8 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
@@ -28,7 +28,7 @@ public class PDAContentAssistProcessor implements IContentAssistProcessor {
@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
int index = offset - 1;
- StringBuffer prefix = new StringBuffer();
+ StringBuilder prefix = new StringBuilder();
IDocument document = viewer.getDocument();
while (index > 0) {
try {

Back to the top