jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r230961 - /jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java
Date Tue, 09 Aug 2005 03:43:55 GMT
Author: dbrosius
Date: Mon Aug  8 20:43:46 2005
New Revision: 230961

URL: http://svn.apache.org/viewcvs?rev=230961&view=rev
Log:
'guard' against npe's

Modified:
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java?rev=230961&r1=230960&r2=230961&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java Mon Aug  8 20:43:46
2005
@@ -670,24 +670,24 @@
 
     try {
       c = (JavaClass)clone();
-    } catch (CloneNotSupportedException e) {
-    }
 
-    c.constant_pool = constant_pool.copy();
-    c.interfaces = (int[])interfaces.clone();
-    c.interface_names = (String[])interface_names.clone();
+      c.constant_pool = constant_pool.copy();
+      c.interfaces = (int[])interfaces.clone();
+      c.interface_names = (String[])interface_names.clone();
 
-    c.fields = new Field[fields.length];
-    for (int i = 0; i < fields.length; i++)
-      c.fields[i] = fields[i].copy(c.constant_pool);
+      c.fields = new Field[fields.length];
+      for (int i = 0; i < fields.length; i++)
+        c.fields[i] = fields[i].copy(c.constant_pool);
 
-    c.methods = new Method[methods.length];
-    for (int i = 0; i < methods.length; i++)
-      c.methods[i] = methods[i].copy(c.constant_pool);
+      c.methods = new Method[methods.length];
+      for (int i = 0; i < methods.length; i++)
+        c.methods[i] = methods[i].copy(c.constant_pool);
 
-    c.attributes = new Attribute[attributes.length];
-    for (int i = 0; i < attributes.length; i++)
-      c.attributes[i] = attributes[i].copy(c.constant_pool);
+      c.attributes = new Attribute[attributes.length];
+      for (int i = 0; i < attributes.length; i++)
+        c.attributes[i] = attributes[i].copy(c.constant_pool);
+    } catch (CloneNotSupportedException e) {
+    }
 
     return c;
   }



---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


Mime
View raw message