Uploaded image for project: 'Commons BCEL'
  1. Commons BCEL
  2. BCEL-78

NullPointerException in InstructionHandle

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.1
    • 5.2
    • Main
    • None

    Description

      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();
        }
      

      Attachments

        Activity

          People

            issues@commons.apache.org Apache Commons Developers
            bergrei@yahoo.com bergrei
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: