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

InovokeStatic may refer to either a MethodRef or an InterfaceMethodRef

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 6.6.0
    • None
    • None

    Description

      Java 8 added support for static interfaces.  This means that an invokestatic instruction may refer to either a CONSTANT_Methodref_info or a CONSTANT_InterfaceMethodref_info.  See https://stackoverflow.com/questions/34360718/invokestatic-on-static-method-in-interface for a detailed explanation.  Currently, if InstructionFactory.createInvoke sees an Const.INVOKEINTERFACE it generates an InterfaceMethodref and a Methodref otherwise.  This is incorrect.  I could not figure out any way to make the correct decision programmatically as the original instruction is not available.  So I added an additional createInvoke method with a boolean argument that says whether or not to use an InterfaceMethodref.  The semantics of the original createInvoke method are unchanged.

      Attachments

        Activity

          People

            Unassigned Unassigned
            markro Mark Roberts
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: