Simplify ArrayPredictionContext.isEmpty()

This commit is contained in:
Sam Harwell 2013-06-30 15:42:27 -05:00
parent dbe1390c6f
commit 89a251e497
1 changed files with 3 additions and 2 deletions

View File

@ -59,8 +59,9 @@ public class ArrayPredictionContext extends PredictionContext {
@Override @Override
public boolean isEmpty() { public boolean isEmpty() {
return size()==1 && // since EMPTY_RETURN_STATE can only appear in the last position, we
returnStates[0]==EMPTY_RETURN_STATE; // don't need to verify that size==1
return returnStates[0]==EMPTY_RETURN_STATE;
} }
@Override @Override