// instruction and so on.
try{
instructionList = new InstructionList(method.getCode().getCode());
}
catch(RuntimeException re){
return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Bad bytecode in the code array of the Code attribute of method '"+method+"'.");
}
instructionList.setPositions(true);
// Start verification.
VerificationResult vr = VerificationResult.VR_OK; //default
try{
delayedPass2Checks();
}
catch(ClassConstraintException cce){
vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage());
return vr;
}
try{
pass3StaticInstructionChecks();
pass3StaticInstructionOperandsChecks();
}
catch(StaticCodeConstraintException scce){
vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, scce.getMessage());
}
catch(ClassCastException cce){
vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Class Cast Exception: " + cce.getMessage());
}
return vr;
}
else{ //did not pass Pass 2.
return VerificationResult.VR_NOTYET;