You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2010/07/19 15:22:44 UTC

DO NOT REPLY [Bug 49615] New: BCELifier produces incorrect code for methods containing loads of class literals from constant pool [PATCH].

https://issues.apache.org/bugzilla/show_bug.cgi?id=49615

           Summary: BCELifier produces incorrect code for methods
                    containing loads of class literals from constant pool
                    [PATCH].
           Product: BCEL
           Version: 5.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: notifications@jakarta.apache.org
        ReportedBy: abassouK@gmail.com


Created an attachment (id=25784)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25784)
Proposed fix, please review.

When a class literal is loaded from the constant pool, the BCELifier produces
not compilable code. The attached patch fixes this issue with 3 modifications:
* LDC#getValue(): when a class constant is referenced, return a correct
ObjectType instance.
* PUSH: new constructor that takes an ObjectType instance and does the right
thing (I hope)
* BCELFactory#createConstant(): if the constant is an ObjectType, produce the
correct embedding string.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49615] BCELifier produces incorrect code for methods containing loads of class literals from constant pool [PATCH].

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49615

Tassos Bassoukos <ab...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49615] BCELifier produces incorrect code for methods containing loads of class literals from constant pool [PATCH].

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49615

--- Comment #1 from Dave Brosius <db...@mebigfatguy.com> 2010-07-19 20:14:13 EDT ---
Here is a sample input class showing the problem:

public class Foo
{
    public String getFooName()
    {
        return Foo.class.getName();
    }
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49615] BCELifier produces incorrect code for methods containing loads of class literals from constant pool [PATCH].

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49615

Dave Brosius <db...@mebigfatguy.com> changed:

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

--- Comment #2 from Dave Brosius <db...@mebigfatguy.com> 2010-07-19 20:29:45 EDT ---
Patch fixes the issue. Seems good to me.

Applied, thanks alot for your help.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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