Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-07-18 00:45:48 -0400
committerAndrew Gvozdev2011-07-18 00:49:04 -0400
commit114952f64a850260f9d4043d5d31fd690d8ca99d (patch)
treea303d15964822d536dfdf54a35ae4df562736c15 /core
parent72b60757333e37599ae117c9472ac821c4ebbca7 (diff)
downloadorg.eclipse.cdt-114952f64a850260f9d4043d5d31fd690d8ca99d.tar.gz
org.eclipse.cdt-114952f64a850260f9d4043d5d31fd690d8ca99d.tar.xz
org.eclipse.cdt-114952f64a850260f9d4043d5d31fd690d8ca99d.zip
bug 352301: [performance] Intern strings used for creation of
ICLanguageSettingsEntry objects
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ACSettingEntry.java3
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ACSettingEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ACSettingEntry.java
index ff509a828d..37420be10a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ACSettingEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ACSettingEntry.java
@@ -11,6 +11,7 @@
package org.eclipse.cdt.core.settings.model;
import org.eclipse.cdt.core.settings.model.util.LanguageSettingEntriesSerializer;
+import org.eclipse.cdt.internal.core.SafeStringInterner;
@@ -19,7 +20,7 @@ public abstract class ACSettingEntry implements ICSettingEntry {
String fName;
ACSettingEntry(String name, int flags){
- fName = name;
+ fName = SafeStringInterner.safeIntern(name);
fFlags = flags;
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java
index 34e9a8b381..451efd313d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.core.settings.model;
+import org.eclipse.cdt.internal.core.SafeStringInterner;
+
public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
@@ -17,7 +19,7 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
public CMacroEntry(String name, String value, int flags) {
super(name, flags);
- fValue = value;
+ fValue = SafeStringInterner.safeIntern(value);
if(fValue == null)
fValue = ""; //$NON-NLS-1$
}

Back to the top