Proxying default methods does not work with 5.5.0-beta-2

Oliver Kaiser <[email protected]> Mon, 6 May 2019 19:34:32 +0200
Newsgroups gmane.comp.java.tapestry.user
Message-ID <[email protected]>
Hi everyone,

given something like this:

public interface Blub {
   public default String foo() {
     return "Default";
   }
}
public class BlubImpl implements Blub {
   @Override
   public String foo() {
     return "Impl";
   }
}

when calling "registry.getService(Blub.class).foo()" using beta-1 this 
works as expected (BlubImpl is called); when using beta-2 only the 
default method is called.

the log output of PlasticProxyFactory shows that the method is skipped 
in the generated class

seems to be related to this commit 
https://github.com/apache/tapestry-5/commit/709d282bfc626ce55cde07cbf909c0b86c2b4bcb#diff-89a017b694cffee07e15608bc316d0d7

now "proxyInterface(Class, PlasticMethod)" only
calls "introduceInterface(Class, PasticMethod)" (which skips the method 
as "isDefaultMethod(m)" returns true); earlier versions had an 
additional for-loop which handled this case (at least from stepping 
though in a debugger it looks that way)


that's a regression, right?


btw: thanks to everyone who worked on the 5.4->5.5 transition; updating 
was very smooth!


Regards,
Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]