[Fb-contrib-commit] SF.net SVN: fb-contrib: [844] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-02-07 22:48:06
|
Revision: 844 http://svn.sourceforge.net/fb-contrib/?rev=844&view=rev Author: dbrosius Date: 2007-02-07 14:46:16 -0800 (Wed, 07 Feb 2007) Log Message: ----------- if throwing InvocationTargetException.getTargetException don't report as LEST Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java 2007-02-07 04:52:12 UTC (rev 843) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java 2007-02-07 22:46:16 UTC (rev 844) @@ -199,18 +199,22 @@ break; } } - } else if ((seen == INVOKEVIRTUAL) && "initCause".equals(getNameConstantOperand())) { - String className = getClassConstantOperand(); - JavaClass exClass = Repository.lookupClass(className); - if (exClass.instanceOf(throwableClass)) { - if (stack.getStackDepth() > 1) { - OpcodeStack.Item itm = stack.getStackItem(1); - int reg = itm.getRegisterNumber(); - if (reg >= 0) - exReg.put(Integer14.valueOf(reg), Boolean.TRUE); - markAsValid = true; // Fixes javac generated code - } - } + } else if (seen == INVOKEVIRTUAL) { + if ("initCause".equals(getNameConstantOperand())) { + String className = getClassConstantOperand(); + JavaClass exClass = Repository.lookupClass(className); + if (exClass.instanceOf(throwableClass)) { + if (stack.getStackDepth() > 1) { + OpcodeStack.Item itm = stack.getStackItem(1); + int reg = itm.getRegisterNumber(); + if (reg >= 0) + exReg.put(Integer14.valueOf(reg), Boolean.TRUE); + markAsValid = true; // Fixes javac generated code + } + } + } else if ("getTargetException".equals(getNameConstantOperand()) && "java/lang/reflect/InvocationTargetException".equals(getClassConstantOperand())) { + markAsValid = true; + } } else if (seen == ATHROW) { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |