DO NOT REPLY [Bug 38834] New: - nullpointer exception in InstructionHandle

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]/bugzilla/>
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38834>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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

           Summary: nullpointer exception in InstructionHandle
           Product: BCEL
           Version: 5.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Main
        AssignedTo: [email protected]
        ReportedBy: [email protected]


please add missing checks for null references in InstructionHandle.java to 
avoid null pointer exceptions:

A) in line 161

  /**
   * Denote this handle isn't referenced anymore by t.
   */
  public void removeTargeter(InstructionTargeter t) {
==ADD==>    if (targeters != null)
      targeters.remove(t);
  }

B) in line 238

  /** @return all attributes associated with this handle
   */
  public Collection getAttributes() {
==ADD==>    if(attributes == null)
==ADD==>      attributes = new HashMap(3);
    return attributes.values();
  }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
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.