From 5bd1de23dd6d307637b845d97fcbc3e8a1574f12 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Mon, 25 Jan 2010 18:35:42 +0000 Subject: [PATCH] cosmetics: generics --- .../model/CExternalSettingsDeltaProcessor.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java index b1760d824cc..0f098b3b688 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java @@ -90,10 +90,10 @@ public class CExternalSettingsDeltaProcessor { current = new ICSourceEntry[0]; } } - List newEntries = calculateUpdatedEntries(current, diff[0], diff[1]); + List newEntries = calculateUpdatedEntries(current, diff[0], diff[1]); if(newEntries != null){ try { - cfgDes.setSourceEntries((ICSourceEntry[])newEntries.toArray(new ICSourceEntry[newEntries.size()])); + cfgDes.setSourceEntries(newEntries.toArray(new ICSourceEntry[newEntries.size()])); } catch (WriteAccessException e) { CCorePlugin.log(e); } catch (CoreException e) { @@ -121,10 +121,10 @@ public class CExternalSettingsDeltaProcessor { } } - List newEntries = calculateUpdatedEntries(current, diff[0], diff[1]); + List newEntries = calculateUpdatedEntries(current, diff[0], diff[1]); if(newEntries != null){ try { - bs.setOutputDirectories((ICOutputEntry[])newEntries.toArray(new ICOutputEntry[newEntries.size()])); + bs.setOutputDirectories(newEntries.toArray(new ICOutputEntry[newEntries.size()])); } catch (WriteAccessException e) { CCorePlugin.log(e); } @@ -207,8 +207,8 @@ public class CExternalSettingsDeltaProcessor { return changed; } - private static List calculateUpdatedEntries(ICSettingEntry current[], ICSettingEntry added[], ICSettingEntry removed[]){ - LinkedHashMap map = new LinkedHashMap(); + private static List calculateUpdatedEntries(ICSettingEntry current[], ICSettingEntry added[], ICSettingEntry removed[]){ + LinkedHashMap map = new LinkedHashMap(); boolean changed = false; if(added != null){ CDataUtil.fillEntriesMapByContentsKey(map, added); @@ -227,14 +227,14 @@ public class CExternalSettingsDeltaProcessor { for(int i = 0; i < removed.length; i++){ ICSettingEntry entry = removed[i]; EntryContentsKey cKey = new EntryContentsKey(entry); - ICSettingEntry cur = (ICSettingEntry)map.get(cKey); + ICSettingEntry cur = map.get(cKey); if(cur != null && !cur.isBuiltIn()){ map.remove(cKey); changed = true; } } } - return changed ? new ArrayList(map.values()) : null; + return changed ? new ArrayList(map.values()) : null; } private static boolean isSettingCompatible(ICLanguageSetting setting, CExternalSetting provider){