forked from phoedos/pmd
bug fix: detection of extra parenthesis was not correct, selfassigned returned true for more than cases such as '(i)++'
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4852 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -146,7 +146,8 @@ public class NameOccurrence {
|
|||||||
// deal with extra parenthesis: "(i)++"
|
// deal with extra parenthesis: "(i)++"
|
||||||
if (p instanceof ASTPrimaryPrefix && p.jjtGetNumChildren() == 1 &&
|
if (p instanceof ASTPrimaryPrefix && p.jjtGetNumChildren() == 1 &&
|
||||||
gp instanceof ASTPrimaryExpression && gp.jjtGetNumChildren() == 1&&
|
gp instanceof ASTPrimaryExpression && gp.jjtGetNumChildren() == 1&&
|
||||||
node instanceof ASTExpression && node.jjtGetNumChildren() == 1) {
|
node instanceof ASTExpression && node.jjtGetNumChildren() == 1 &&
|
||||||
|
node.jjtGetParent() instanceof ASTPrimaryPrefix && node.jjtGetParent().jjtGetNumChildren() == 1) {
|
||||||
l = node;
|
l = node;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user