You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2007/11/05 16:37:21 UTC

DO NOT REPLY [Bug 43795] New: - Deleting all instructions of a list shows wrong behaviour

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

           Summary: Deleting all instructions of a list shows wrong
                    behaviour
           Product: BCEL
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: bcel-dev@jakarta.apache.org
        ReportedBy: markus.gaisbauer@gmail.com


Deleting all instructions (i.e. everything from start to end) in a list shows 
the following behaviour:

 The length of the list is not 0 afterwards.
 Only the handle of the first instruction is disposed.

To fix the problem, apply the following patch:

Index: InstructionList.java
===================================================================
--- InstructionList.java	(revision 592025)
+++ InstructionList.java	(working copy)
@@ -677,8 +677,9 @@
     private void remove( InstructionHandle prev, InstructionHandle next )
             throws TargetLostException {
         InstructionHandle first, last; // First and last deleted instruction
-        if ((prev == null) && (next == null)) { // singleton list
-            first = last = start;
+        if ((prev == null) && (next == null)) { 
+            first = start;
+			last = end;
             start = end = null;
         } else {
             if (prev == null) { // At start of list

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 43795] - Deleting all instructions of a list shows wrong behaviour

Posted by bu...@apache.org.
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=43795>.
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=43795


tcurdt@apache.org changed:

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




------- Additional Comments From tcurdt@apache.org  2007-11-07 10:56 -------
Thanks, applied to trunk.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org