From 48eac479f6526b41a5960fd1574020d0eb645532 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Tue, 7 Oct 2014 16:44:58 -0700 Subject: Polish generics --- asm/src/org/aspectj/asm/AsmManager.java | 9 +++++---- asm/src/org/aspectj/asm/internal/ProgramElement.java | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'asm/src') diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java index 20579df40..2ab34c862 100644 --- a/asm/src/org/aspectj/asm/AsmManager.java +++ b/asm/src/org/aspectj/asm/AsmManager.java @@ -256,6 +256,7 @@ public class AsmManager implements IStructureModel { ((AspectJElementHierarchy) hierarchy).setAsmManager(this); hierarchyReadOK = true; mapper = (RelationshipMap) s.readObject(); + s.close(); } } catch (FileNotFoundException fnfe) { // That is OK @@ -931,13 +932,13 @@ public class AsmManager implements IStructureModel { Set sourcesToRemove = new HashSet(); Set nonExistingHandles = new HashSet(); // Cache of handles that we // *know* are invalid - int srchandlecounter = 0; - int tgthandlecounter = 0; +// int srchandlecounter = 0; +// int tgthandlecounter = 0; // Iterate over the source handles in the relationships map Set keyset = mapper.getEntries(); // These are source handles for (String hid : keyset) { - srchandlecounter++; +// srchandlecounter++; // Do we already know this handle points to nowhere? if (nonExistingHandles.contains(hid)) { @@ -967,7 +968,7 @@ public class AsmManager implements IStructureModel { // Iterate through the targets for this relationship for (Iterator targetIter = targets.iterator(); targetIter.hasNext();) { String targethid = targetIter.next(); - tgthandlecounter++; +// tgthandlecounter++; // Do we already know it doesn't exist? if (nonExistingHandles.contains(targethid)) { if (dumpDeltaProcessing) { diff --git a/asm/src/org/aspectj/asm/internal/ProgramElement.java b/asm/src/org/aspectj/asm/internal/ProgramElement.java index 497b25028..51aafd936 100644 --- a/asm/src/org/aspectj/asm/internal/ProgramElement.java +++ b/asm/src/org/aspectj/asm/internal/ProgramElement.java @@ -830,6 +830,7 @@ public class ProgramElement implements IProgramElement { } } + @SuppressWarnings("unchecked") public Map> getDeclareParentsMap() { Map> s = (Map>) kvpairs.get("declareparentsmap"); return s; -- cgit v1.2.3