1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

bug 352301: [performance] Intern strings used for creation of

ICLanguageSettingsEntry objects
This commit is contained in:
Andrew Gvozdev 2011-07-18 00:45:48 -04:00
parent 72b6075733
commit 114952f64a
2 changed files with 5 additions and 2 deletions

View file

@ -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;
}

View file

@ -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$
}