Update of /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13160/src/com/mebigfatguy/fbcontrib/detect
Modified Files:
NeedlessInstanceRetrieval.java
Log Message:
ignore the string class as well, as .append is often a false positive
Index: NeedlessInstanceRetrieval.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- NeedlessInstanceRetrieval.java 5 Feb 2006 08:10:33 -0000 1.4
+++ NeedlessInstanceRetrieval.java 5 Feb 2006 08:32:27 -0000 1.5
@@ -85,7 +85,9 @@
String sig = getSigConstantOperand();
Type retType = Type.getReturnType(sig);
if (retType.getSignature().startsWith("L")) {
- if (!"java/lang/Object".equals(getClassConstantOperand())) {
+ String clsName = getClassConstantOperand();
+ if (!"java/lang/Object".equals(clsName)
+ && !"java/lang/String".equals(clsName)) {
invokePC = getPC();
state = SEEN_INVOKE;
}
|