svn commit: r382594 - /jakarta/bcel/trunk/src/java/org/apache/bcel/generic/InstructionHandle.java

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
Author: tcurdt
Date: Thu Mar  2 16:49:34 2006
New Revision: 382594

URL: http://svn.apache.org/viewcvs?rev=382594&view=rev
Log:
applied 

http://issues.apache.org/bugzilla/show_bug.cgi?id=38834


Modified:
    jakarta/bcel/trunk/src/java/org/apache/bcel/generic/InstructionHandle.java

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/generic/InstructionHandle.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/generic/InstructionHandle.java?rev=382594&r1=382593&r2=382594&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/generic/InstructionHandle.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/generic/InstructionHandle.java Thu Mar  2 16:49:34 2006
@@ -159,7 +159,9 @@
    * Denote this handle isn't referenced anymore by t.
    */
   public void removeTargeter(InstructionTargeter t) {
-    targeters.remove(t);
+    if(targeters != null) {
+      targeters.remove(t);
+    }
   }
   
   /**
@@ -236,6 +238,9 @@
   /** @return all attributes associated with this handle
    */
   public Collection getAttributes() {
+    if(attributes == null) {
+        attributes = new HashMap(3);
+    }
     return attributes.values();
   }
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.