Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-06-19 15:25:13 +0000
committerLars Vogel2019-06-20 17:00:38 +0000
commite9997e416c01f3c289af26d1fd24536a516192b3 (patch)
treef2746c056224617cb4b7398a5cace703a634caf4 /bundles/org.eclipse.osgi
parent597dc31fa183f3aa7dfdaf008d166cb9e8db674c (diff)
downloadrt.equinox.framework-e9997e416c01f3c289af26d1fd24536a516192b3.tar.gz
rt.equinox.framework-e9997e416c01f3c289af26d1fd24536a516192b3.tar.xz
rt.equinox.framework-e9997e416c01f3c289af26d1fd24536a516192b3.zip
Small String optimizationI20190620-1800
Useless toString call in String concatination Using String.valueOf instead of ""+ Use faster indexof('') version Use appends(string, startI,EndI) directly Change-Id: I937843410a4abc47803119e26073803fb1c1b115 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'bundles/org.eclipse.osgi')
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java2
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
index 8a2b22ece..c792c3155 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
@@ -553,7 +553,7 @@ public final class StorageManager {
String value;
if (entry.getFileType() != FILETYPE_STANDARD) {
value = Integer.toString(entry.getWriteId() - 1) + ',' + //In the table we save the write number - 1, because the read number can be totally different.
- Integer.toString(entry.getFileType());
+ entry.getFileType();
} else {
value = Integer.toString(entry.getWriteId() - 1); //In the table we save the write number - 1, because the read number can be totally different.
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
index a766e05a6..f438b7409 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
@@ -237,7 +237,7 @@ public abstract class NLS {
break;
}
// otherwise write out the chars inside the quotes
- buffer.append(message.substring(nextIndex, index));
+ buffer.append(message, nextIndex, index);
i = index;
break;
default :

Back to the top