[Fb-contrib-commit] SF.net SVN: fb-contrib:[1556] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2010-05-09 22:19:41
|
Revision: 1556
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1556&view=rev
Author: dbrosius
Date: 2010-05-09 22:19:35 +0000 (Sun, 09 May 2010)
Log Message:
-----------
don't rely on getNextOpCode as it's fairly new
Modified Paths:
--------------
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java
Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java
===================================================================
--- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java 2010-05-09 06:34:10 UTC (rev 1555)
+++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java 2010-05-09 22:19:35 UTC (rev 1556)
@@ -211,7 +211,7 @@
clearUserValue(item);
} else if (!"clone".equals(name)) {
Type t = Type.getReturnType(sig);
- if ((t != Type.VOID) && (getNextOpcode() != POP)) {
+ if ((t != Type.VOID) && nextOpIsPop()) {
clearUserValue(item);
}
}
@@ -320,6 +320,11 @@
}
}
+ private boolean nextOpIsPop() {
+ int nextPC = getNextPC();
+ return getCode().getCode()[nextPC] == POP;
+ }
+
private void clearUserValue(OpcodeStack.Item item) {
Object uo = item.getUserValue();
if (uo instanceof Integer) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|