Simple cleanup patch

"Dave Brosius" <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <000b01c4d9ba$b5474db0$e97596d1@MBFG>
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;

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.