DO NOT REPLY [Bug 36110] - A bug in LocalVariableGen

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
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=36110>.
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=36110


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From [email protected]  2005-08-11 05:38 -------
agreed.. nice detective work. I've added this, which i believe should be valid,
and solve the problem, if icky.

  public LocalVariableGen(int index, String name, Type type,
			  InstructionHandle start, InstructionHandle end) {
    if((index < 0) || (index > Constants.MAX_SHORT))
      throw new ClassGenException("Invalid index index: " + index);
    
    this.name  = name;
    this.type  = type;
    this.index  = index;
    // setStart and setEnd add 'this' to a HashSet, causing the hash to compute.
    // The hash uses start and end, so set them before calling setStart/setEnd.
    // Otherwise, the remove will fail because the hash is different than the add.
    // Icky, but should be ok. See Bug: 36110  -- dbrosius
    this.start = start;
    this.end = end;
    setStart(start);
    setEnd(end);
  }

please let us know if there are still problems.

-- 
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.