jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r230960 - /jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java
Date Tue, 09 Aug 2005 03:41:18 GMT
Author: dbrosius
Date: Mon Aug  8 20:41:11 2005
New Revision: 230960

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

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

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java?rev=230960&r1=230959&r2=230960&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java Mon Aug  8 20:41:11
2005
@@ -323,14 +323,14 @@
 
     try {
       c = (ConstantPool)clone();
-    } catch(CloneNotSupportedException e) {}
+      c.constant_pool = new Constant[constant_pool_count];
 
-    c.constant_pool = new Constant[constant_pool_count];
+      for(int i=1; i < constant_pool_count; i++) {
+        if(constant_pool[i] != null)
+        	c.constant_pool[i] = constant_pool[i].copy();
+      }
+    } catch(CloneNotSupportedException e) {}
 
-    for(int i=1; i < constant_pool_count; i++) {
-      if(constant_pool[i] != null)
-	c.constant_pool[i] = constant_pool[i].copy();
-    }
 
     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