forked from phoedos/pmd
fixing performance issue on PreserveStackTrace by removing use of descendant:: axis. See bug 1808110
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@7010 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
???? - 4.2.6:
|
???? - 4.2.6:
|
||||||
|
|
||||||
|
Fixed bug 1808110 - Fixed performance issue on PreserveStackTrace
|
||||||
Fixed bug 2832322 - cpd.xml file tag path attribute should be entity-encoded
|
Fixed bug 2832322 - cpd.xml file tag path attribute should be entity-encoded
|
||||||
Fixed bug 2590258 - NPE with nicerhtml output
|
Fixed bug 2590258 - NPE with nicerhtml output
|
||||||
Fixed bug 2317099 - False + in SimplifyCondition
|
Fixed bug 2317099 - False + in SimplifyCondition
|
||||||
|
@@ -128,7 +128,7 @@ public class PreserveStackTrace extends AbstractJavaRule {
|
|||||||
// In case of NPE...
|
// In case of NPE...
|
||||||
if ( node != null && node.getImage() != null )
|
if ( node != null && node.getImage() != null )
|
||||||
{
|
{
|
||||||
List <Node> nodes = catchStmt.findChildNodesWithXPath("descendant::StatementExpression/PrimaryExpression/PrimaryPrefix/Name[@Image = '" + node.getImage() + ".initCause']");
|
List <Node> nodes = catchStmt.findChildNodesWithXPath("./Block/BlockStatement/Statement/StatementExpression/PrimaryExpression/PrimaryPrefix/Name[@Image = '" + node.getImage() + ".initCause']");
|
||||||
if ( nodes != null && nodes.size() > 0 )
|
if ( nodes != null && nodes.size() > 0 )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user