[Fb-contrib-commit] SF.net SVN: fb-contrib: [881] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-03-13 03:31:20
|
Revision: 881 http://svn.sourceforge.net/fb-contrib/?rev=881&view=rev Author: dbrosius Date: 2007-03-12 20:31:20 -0700 (Mon, 12 Mar 2007) Log Message: ----------- if you can't find an iterator for a group, short-circuit the attempt to find a modifying statement 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-03-11 15:11:02 UTC (rev 880) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2007-03-13 03:31:20 UTC (rev 881) @@ -187,14 +187,16 @@ int id = findCollectionGroup(itm, true); if (id >= 0) { Integer it = groupToIterator.get(Integer14.valueOf(id)); - Loop loop = loops.get(it); - if (loop != null) { - int pc = getPC(); - if (loop.hasPC(pc)) { - bugReporter.reportBug(new BugInstance(this, "DWI_MODIFYING_WHILE_ITERATING", NORMAL_PRIORITY) - .addClass(this) - .addMethod(this) - .addSourceLine(this)); + if (it != null) { + Loop loop = loops.get(it); + if (loop != null) { + int pc = getPC(); + if (loop.hasPC(pc)) { + bugReporter.reportBug(new BugInstance(this, "DWI_MODIFYING_WHILE_ITERATING", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |