mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +02:00
cleanup: warning unchecked cast suppressed for clone()
This commit is contained in:
parent
4a593950ae
commit
67a203c382
1 changed files with 6 additions and 2 deletions
|
@ -873,13 +873,16 @@ public class PathEntryTranslator {
|
||||||
}
|
}
|
||||||
|
|
||||||
PathSettingsContainer newContainer = fStorage.getChildContainer(path, true, true);
|
PathSettingsContainer newContainer = fStorage.getChildContainer(path, true, true);
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
KindBasedStore<LinkedHashMap<ICSettingEntry, PathEntryComposer>> cloneStore =
|
KindBasedStore<LinkedHashMap<ICSettingEntry, PathEntryComposer>> cloneStore =
|
||||||
(KindBasedStore<LinkedHashMap<ICSettingEntry, PathEntryComposer>>)fStore.clone();
|
(KindBasedStore<LinkedHashMap<ICSettingEntry, PathEntryComposer>>)fStore.clone();
|
||||||
IKindBasedInfo<LinkedHashMap<ICSettingEntry, PathEntryComposer>> info[] = cloneStore.getContents();
|
IKindBasedInfo<LinkedHashMap<ICSettingEntry, PathEntryComposer>> info[] = cloneStore.getContents();
|
||||||
for (IKindBasedInfo<LinkedHashMap<ICSettingEntry, PathEntryComposer>> kindInfo : info) {
|
for (IKindBasedInfo<LinkedHashMap<ICSettingEntry, PathEntryComposer>> kindInfo : info) {
|
||||||
LinkedHashMap<ICSettingEntry, PathEntryComposer> map = kindInfo.getInfo();
|
LinkedHashMap<ICSettingEntry, PathEntryComposer> map = kindInfo.getInfo();
|
||||||
if(map != null){
|
if(map != null){
|
||||||
kindInfo.setInfo((LinkedHashMap<ICSettingEntry, PathEntryComposer>)map.clone());
|
@SuppressWarnings("unchecked")
|
||||||
|
LinkedHashMap<ICSettingEntry, PathEntryComposer> clone = (LinkedHashMap<ICSettingEntry, PathEntryComposer>)map.clone();
|
||||||
|
kindInfo.setInfo(clone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PathEntryCollector newCr = new PathEntryCollector(newContainer, cloneStore, fProject/*, fCfg*/);
|
PathEntryCollector newCr = new PathEntryCollector(newContainer, cloneStore, fProject/*, fCfg*/);
|
||||||
|
@ -894,6 +897,7 @@ public class PathEntryTranslator {
|
||||||
public void setEntries(int kind, ICLanguageSettingEntry entries[], Set<ICSettingEntry> exportedEntries){
|
public void setEntries(int kind, ICLanguageSettingEntry entries[], Set<ICSettingEntry> exportedEntries){
|
||||||
IPath path = getPath();
|
IPath path = getPath();
|
||||||
HashSet<ICSettingEntry> parentSet = getEntriesSetCopy(kind);
|
HashSet<ICSettingEntry> parentSet = getEntriesSetCopy(kind);
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
HashSet<ICSettingEntry> removedParentSet = (HashSet<ICSettingEntry>)parentSet.clone();
|
HashSet<ICSettingEntry> removedParentSet = (HashSet<ICSettingEntry>)parentSet.clone();
|
||||||
HashSet<ICLanguageSettingEntry> addedThisSet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(entries));
|
HashSet<ICLanguageSettingEntry> addedThisSet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(entries));
|
||||||
removedParentSet.removeAll(addedThisSet);
|
removedParentSet.removeAll(addedThisSet);
|
||||||
|
@ -1286,7 +1290,7 @@ public class PathEntryTranslator {
|
||||||
|
|
||||||
private static ICSettingEntry[] replaceUserEntries(ICSettingEntry[] oldEntries, ICSettingEntry[] newUsrEntries){
|
private static ICSettingEntry[] replaceUserEntries(ICSettingEntry[] oldEntries, ICSettingEntry[] newUsrEntries){
|
||||||
Set<ICSettingEntry> set = new LinkedHashSet<ICSettingEntry>();
|
Set<ICSettingEntry> set = new LinkedHashSet<ICSettingEntry>();
|
||||||
Class componentType = null;
|
Class<?> componentType = null;
|
||||||
|
|
||||||
if(newUsrEntries != null){
|
if(newUsrEntries != null){
|
||||||
for (ICSettingEntry entry : newUsrEntries) {
|
for (ICSettingEntry entry : newUsrEntries) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue