Update of /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7744/src/com/mebigfatguy/fbcontrib/detect
Modified Files:
LocalSynchronizedCollection.java
Log Message:
don't report on locals if they synchronized on.
Index: LocalSynchronizedCollection.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LocalSynchronizedCollection.java 11 Mar 2006 15:15:19 -0000 1.3
+++ LocalSynchronizedCollection.java 12 Mar 2006 04:14:53 -0000 1.4
@@ -158,6 +158,14 @@
cri.setPriority(LOW_PRIORITY);
}
}
+ } else if (seen == MONITORENTER) {
+ //Assume if synchronized blocks are used then something tricky is going on.
+ //There is really no valid reason for this, other than folks who use
+ //synchronized blocks tend to know what's going on.
+ if (stack.getStackDepth() > 0) {
+ OpcodeStack.Item item = stack.getStackItem(0);
+ syncRegs.remove(item.getUserValue());
+ }
}
}
} finally {
|