Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2507

Abstract package private class with public method is not intercepted

XMLWordPrintable

      Reproducer is on my branch.

      In short you need an abstract package private superclass with public method with an interceptor bound to it.
      Then you write an implementation and expect it to work, but it won't.

      This is because JVM creates a bridge method on the subclass (this is JVM hack to allow for reflective invocation from subclass to non-public superclass method - see this SO question and this Oracle bug report).
      When creating proxy subclass, Weld will skip such method because method.isBridge() returns true.

              manovotn Matěj Novotný
              manovotn Matěj Novotný
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: