Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-235

Compiler throws NPE when handling instances of anonymous or local class

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.1.3
    • 2.1.2
    • None

    Description

      The compiler can throw a NullPointerException when trying to generate code which handles instances of anonymous or local classes. For example, if a rule is attached to a method of an anonymous class org.my.Foo$1 then the compiler will throw an NPE when compiling the term $0.

      At certain points during generation of a compiled rule the compiler may need to insert the binary name of org.my.Foo$1 into the bytecode. It calls method Class.getCanonicalName to obtain the name of the class and converts this to binary form. However, this does not work for a local or anonymous class because getCanonicalName returns NULL.

      Attachments

        Activity

          People

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: