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

Compiler throws NPE when handling instances of anonymous or local class

    Details

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adinn Andrew Dinn
                Reporter:
                adinn Andrew Dinn
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: