You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by Dave Brosius <db...@qis.net> on 2004/12/04 05:35:38 UTC
Simple cleanup patch
The code's got a try/catch block, might as well use it:
Index: src/java/org/apache/bcel/verifier/VerifyDialog.java
===================================================================
RCS file: /home/cvspublic/jakarta-bcel/src/java/org/apache/bcel/verifier/VerifyDialog.java,v
retrieving revision 1.2
diff -u -r1.2 VerifyDialog.java
--- src/java/org/apache/bcel/verifier/VerifyDialog.java 23 May 2003 07:55:33 -0000 1.2
+++ src/java/org/apache/bcel/verifier/VerifyDialog.java 4 Dec 2004 04:30:03 -0000
@@ -542,18 +542,19 @@
JavaClass jc = null;
try {
jc = Repository.lookupClass(class_name);
+ int nr = jc.getMethods().length;
+ for (int i=0; i<nr; i++) {
+ vr = v.doPass3b(i);
+ if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+ color = Color.red;
+ break;
+ }
+ }
} catch (ClassNotFoundException ex) {
// FIXME: report the error
ex.printStackTrace();
}
- int nr = jc.getMethods().length;
- for (int i=0; i<nr; i++) {
- vr = v.doPass3b(i);
- if (vr.getStatus() != VerificationResult.VERIFIED_OK){
- color = Color.red;
- break;
- }
- }
+
}
else{
color = Color.yellow;