fixed IndexOutOfBoundsException when decompiling

StandardVariableNamesInspectionBase
This commit is contained in:
Stiver 2014-06-01 15:34:28 +02:00
parent 7189d18bfe
commit 7d44f73cb9
2 changed files with 2 additions and 1 deletions

View File

@ -295,6 +295,7 @@ public class IdeaNotNullHelper {
}
sequence.getStats().removeWithKey(ifstat.id);
sequence.setFirst(sequence.getStats().get(0));
return true;
}

View File

@ -229,7 +229,7 @@ public class StackVarsProcessor {
if(nd.statement.type == Statement.TYPE_DO) {
DoStatement loop = (DoStatement)nd.statement;
if(nd.type == DirectNode.NODE_INCREMENT && loop.getLooptype() == DoStatement.LOOP_FOR) { // "downgrade" loop to 'while'
if(loop.getLooptype() == DoStatement.LOOP_FOR && loop.getInitExprent() == null && loop.getIncExprent() == null) { // "downgrade" loop to 'while'
loop.setLooptype(DoStatement.LOOP_WHILE);
}
}