-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
False
-
-
False
-
---
-
-
During execution of the constructor of an intercepted non-contextual instance (which is a superclass of an interception proxy, *_InterceptionSubclass), virtual method calls were supposed to be delegated to super by using invokespecial.
This wasn't done properly and this commit moves the logic even closer to client proxies. If the target method is abstract, we just throw an exception; any kind of invocation would fail anyway. Instead of emitting invokespecial directly for the method in question, we create a new method descriptor with the same method name, parameter types and return type, but with the owner type set to the intercepted non-contextual class. This is where method search should start anyway.
If the intercepted type is an interface (or, not very likely, java.lang.Object), we don't have to avoid delegation, because interfaces cannot have constructors (and the java.lang.Object constructor does nothing).
Follows up on #49931