diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/KindBasedStore.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/KindBasedStore.java index ad79dfa51b1..fa8e73bf264 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/KindBasedStore.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/KindBasedStore.java @@ -27,7 +27,7 @@ import org.eclipse.cdt.core.settings.model.ICSettingEntry; * @see ICSettingEntry#SOURCE_PATH * */ -public class KindBasedStore implements Cloneable { +public class KindBasedStore implements Cloneable { private static final int INDEX_INCLUDE_PATH = 0; private static final int INDEX_INCLUDE_FILE = 1; private static final int INDEX_MACRO = 2; @@ -148,13 +148,15 @@ public class KindBasedStore implements Cloneable { } throw new IllegalArgumentException(UtilMessages.getString("KindBasedStore.1")); //$NON-NLS-1$ } - public Object get(int kind){ - return fEntryStorage[kindToIndex(kind)]; + @SuppressWarnings("unchecked") + public TypeStored get(int kind){ + return (TypeStored) fEntryStorage[kindToIndex(kind)]; } - public Object put(int kind, Object object){ + @SuppressWarnings("unchecked") + public TypeStored put(int kind, TypeStored object){ int index = kindToIndex(kind); - Object old = fEntryStorage[index]; + TypeStored old = (TypeStored) fEntryStorage[index]; fEntryStorage[index] = object; return old; } @@ -210,7 +212,8 @@ public class KindBasedStore implements Cloneable { @Override public Object clone() { try { - KindBasedStore clone = (KindBasedStore)super.clone(); + @SuppressWarnings("unchecked") + KindBasedStore clone = (KindBasedStore)super.clone(); clone.fEntryStorage = fEntryStorage.clone(); return clone; } catch (CloneNotSupportedException e) {