Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java
index 930378462..f7ff68cd6 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java
@@ -23,7 +23,7 @@ import java.util.HashMap;
*/
public final class StringPool {
private int savings;
- private final HashMap map = new HashMap();
+ private final HashMap<String, String> map = new HashMap<String, String>();
/**
* Creates a new string pool.
@@ -41,11 +41,11 @@ public final class StringPool {
public String add(String string) {
if (string == null)
return string;
- Object result = map.get(string);
+ String result = map.get(string);
if (result != null) {
if (result != string)
savings += 44 + 2 * string.length();
- return (String) result;
+ return result;
}
//explicitly copy the string to trim excess baggage
String trim = new String(string.toCharArray());

Back to the top