Skip to content

Commit

Permalink
Issue #985: Fix PMD violations for ShortVariable rule (partial)
Browse files Browse the repository at this point in the history
  • Loading branch information
romani committed Oct 9, 2015
1 parent 2a77329 commit a75c64e
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -399,16 +399,16 @@ private static ParseTree getNextSibling(ParseTree node) {
final ParseTree parent = node.getParent(); final ParseTree parent = node.getParent();
final int childCount = parent.getChildCount(); final int childCount = parent.getChildCount();


int i = 0; int index = 0;
while (true) { while (true) {
final ParseTree currentNode = parent.getChild(i); final ParseTree currentNode = parent.getChild(index);
if (currentNode.equals(node)) { if (currentNode.equals(node)) {
if (i != childCount - 1) { if (index != childCount - 1) {
nextSibling = parent.getChild(i + 1); nextSibling = parent.getChild(index + 1);
} }
break; break;
} }
i++; index++;
} }
} }
return nextSibling; return nextSibling;
Expand Down

0 comments on commit a75c64e

Please sign in to comment.