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

BCELifier produces incorrect code for methods containing loads of class literals from constant pool

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 6.0
    • Component/s: Main
    • Labels:

      Description

      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.

        Attachments

        1. bcel-1.patch
          2 kB
          Tassos Bassoukos

          Activity

            People

            • Assignee:
              issues@commons.apache.org Apache Commons Developers
              Reporter:
              abassouk@gmail.com Tassos Bassoukos
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: