Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-06-20 06:55:39 +0000
committerLars Vogel2019-06-20 14:23:44 +0000
commit28eafb0f03d500dd162f2151845d2644cfc5ab5c (patch)
tree566014f80e777223b4d78d8d43b87d9f9289beed /org.eclipse.debug.examples.core
parent7757dfc66e70003c0d3b546af66aba962b4fa44e (diff)
downloadeclipse.platform.debug-28eafb0f03d500dd162f2151845d2644cfc5ab5c.tar.gz
eclipse.platform.debug-28eafb0f03d500dd162f2151845d2644cfc5ab5c.tar.xz
eclipse.platform.debug-28eafb0f03d500dd162f2151845d2644cfc5ab5c.zip
Small String optimizationI20190620-1800
Useless toString call in String concatenation Using String.valueOf instead of ""+ Use faster indexof('') version Change-Id: Iec383bd1b6af03a40af735f9ec878689caf4fb23 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.debug.examples.core')
-rw-r--r--org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java10
1 files changed, 5 insertions, 5 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 226aa6015..3b46d75bf 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
@@ -380,7 +380,7 @@ public class PDAVirtualMachine {
pdaVM = new PDAVirtualMachine(programFile, debug, commandPort, eventPort);
pdaVM.startDebugger();
} catch (IOException e) {
- System.err.println("Error: " + e.toString()); //$NON-NLS-1$
+ System.err.println("Error: " + e); //$NON-NLS-1$
return;
}
pdaVM.run();
@@ -1087,7 +1087,7 @@ public class PDAVirtualMachine {
String var = args.getNextStringArg();
Object val = args.getNextIntOrStringArg();
while (args.hasNextArg()) {
- val = val.toString() + " " + args.getNextStringArg(); //$NON-NLS-1$
+ val = val + " " + args.getNextStringArg(); //$NON-NLS-1$
}
if (sfnumber >= thread.fFrames.size()) {
@@ -1123,7 +1123,7 @@ public class PDAVirtualMachine {
sendCommandResponse("error: invalid thread\n"); //$NON-NLS-1$
return;
}
- sendCommandResponse( Integer.toString(thread.fFrames.size() + 1) + "\n" ); //$NON-NLS-1$
+ sendCommandResponse( (thread.fFrames.size() + 1) + "\n" ); //$NON-NLS-1$
}
@@ -1262,7 +1262,7 @@ public class PDAVirtualMachine {
if (val == null) {
sendCommandResponse("error: variable undefined\n"); //$NON-NLS-1$
} else {
- sendCommandResponse(val.toString() + "\n"); //$NON-NLS-1$
+ sendCommandResponse(val + "\n"); //$NON-NLS-1$
}
}
@@ -1482,7 +1482,7 @@ public class PDAVirtualMachine {
Object val = arg;
if (args.hasNextArg()) {
while (args.hasNextArg()) {
- val = val.toString() + " " + args.getNextStringArg(); //$NON-NLS-1$
+ val = val + " " + args.getNextStringArg(); //$NON-NLS-1$
}
} else {
try {

Back to the top