}
}
}
catch(LoadingException e){
return new VerificationResult(VerificationResult.VERIFIED_REJECTED, e.getMessage());
}
catch(ClassFormatException e){
return new VerificationResult(VerificationResult.VERIFIED_REJECTED, e.getMessage());
}
catch(RuntimeException e){
// BCEL does not catch every possible RuntimeException; e.g. if
// a constant pool index is referenced that does not exist.
return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Parsing via BCEL did not succeed. "+e.getClass().getName()+" occured:\n"+Utility.getStackTrace(e));
}
if (jc != null){
return VerificationResult.VR_OK;
}
else{
//TODO: Maybe change Repository's behaviour to throw a LoadingException instead of just returning "null"
// if a class file cannot be found or in another way be looked up.
return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Repository.lookup() failed. FILE NOT FOUND?");
}
}