commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1231616 - /commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/LocalVariableGen.java
Date Sun, 15 Jan 2012 02:43:46 GMT
Author: dbrosius
Date: Sun Jan 15 02:43:45 2012
New Revision: 1231616

URL: http://svn.apache.org/viewvc?rev=1231616&view=rev
Log:
Apply patch Bug 52422 - [BUG?/PATCH] LocalVariableGen.getLocalVariable() computes incorrect
length - from Thiago Tonelli Bartolomei

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/LocalVariableGen.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/LocalVariableGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/LocalVariableGen.java?rev=1231616&r1=1231615&r2=1231616&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/LocalVariableGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/LocalVariableGen.java
Sun Jan 15 02:43:45 2012
@@ -81,7 +81,7 @@ public class LocalVariableGen implements
     public LocalVariable getLocalVariable( ConstantPoolGen cp ) {
         int start_pc = start.getPosition();
         int length = end.getPosition() - start_pc;
-        if (length > 0) {
+        if (end.getNext() == null) {
             length += end.getInstruction().getLength();
         }
         int name_index = cp.addUtf8(name);



Mime
View raw message