[Fb-contrib-commit] SF.net SVN: fb-contrib: [918] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-09-23 05:16:31
|
Revision: 918 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=918&view=rev Author: dbrosius Date: 2007-09-22 22:16:33 -0700 (Sat, 22 Sep 2007) Log Message: ----------- warnings Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2007-09-19 05:03:28 UTC (rev 917) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2007-09-23 05:16:33 UTC (rev 918) @@ -82,7 +82,7 @@ private BugReporter bugReporter; private OpcodeStack stack; - private List<Set<Comparable>> collectionGroups; + private List<Set<Comparable<?>>> collectionGroups; private Map<Integer, Integer> groupToIterator; private Map<Integer, Loop> loops; @@ -106,7 +106,7 @@ try { stack = new OpcodeStack(); - collectionGroups = new ArrayList<Set<Comparable>>(); + collectionGroups = new ArrayList<Set<Comparable<?>>>(); groupToIterator = new HashMap<Integer, Integer>(); loops = new HashMap<Integer, Loop>(); super.visitClassContext(classContext); @@ -241,7 +241,7 @@ groupToIterator.put(id, regIt); } - Set<Comparable> group = collectionGroups.get(id.intValue()); + Set<Comparable<?>> group = collectionGroups.get(id.intValue()); if (group != null) { group.add(Integer14.valueOf(reg)); } @@ -291,8 +291,8 @@ } } - private Comparable getGroupElement(OpcodeStack.Item itm) { - Comparable groupElement = null; + private Comparable<?> getGroupElement(OpcodeStack.Item itm) { + Comparable<?> groupElement = null; int reg = itm.getRegisterNumber(); if (reg >= 0) @@ -315,18 +315,18 @@ if (id != null) return id.intValue(); - Comparable groupElement = getGroupElement(itm); + Comparable<?> groupElement = getGroupElement(itm); if (groupElement != null) { int numGroups = collectionGroups.size(); for (int i = 0; i < numGroups; i++) { - Set<? extends Comparable> group = collectionGroups.get(i); + Set<? extends Comparable<?>> group = collectionGroups.get(i); if (group.contains(groupElement)) { return i; } } if (addIfNotFound) { - Set<Comparable> group = new HashSet<Comparable>(); + Set<Comparable<?>> group = new HashSet<Comparable<?>>(); group.add(groupElement); collectionGroups.add(group); return collectionGroups.size() - 1; @@ -337,9 +337,9 @@ } private void removeFromCollectionGroup(OpcodeStack.Item itm) { - Comparable groupElement = getGroupElement(itm); + Comparable<?> groupElement = getGroupElement(itm); if (groupElement != null) { - for (Set<? extends Comparable> group : collectionGroups) { + for (Set<? extends Comparable<?>> group : collectionGroups) { if (group.contains(groupElement)) { group.remove(groupElement); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |