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

Implicit implementation of abstract decorator method with at least one parameter is missing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.5.Final, 2.0.0.Alpha1
    • None
    • None
    • None

    Description

      If an abstract decorator declares abstract method and this method is also declared on decorated type, the container should provide an implicit implementation of this method that calls the method on the delegate. However if the method has at least one parameter implementation is missing.

      TCK test (CDI TCK 1.1): org.jboss.jsr299.tck.tests.decorators.definition.DecoratorDefinitionTest.testAbstractDecoratorNotImplementingMethodOfDecoratedType(BankAccount)

      java.lang.NoSuchMethodException: org.jboss.interceptor.util.proxy.TargetInstanceProxy.getTargetClass(int)
      	at java.lang.Class.getDeclaredMethod(Class.java:1954)
      	at org.jboss.jsr299.tck.tests.decorators.definition.1941262783$Proxy$_$$_WeldDecoratorProxy.deposit(1941262783$Proxy$_$$_WeldDecoratorProxy.java)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
      	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)
      	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
      	at org.jboss.weld.bean.proxy.DecoratorProxyMethodHandler.doInvoke(DecoratorProxyMethodHandler.java:78)
      	at org.jboss.interceptor.util.proxy.TargetInstanceProxyMethodHandler.invoke(TargetInstanceProxyMethodHandler.java:43)
      	at org.jboss.weld.bean.proxy.TargetBeanInstance.invoke(TargetBeanInstance.java:88)
      	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
      	at org.jboss.jsr299.tck.tests.decorators.definition.BankAccount$Proxy$_$$_Weld$Proxy$.deposit(BankAccount$Proxy$_$$_Weld$Proxy$.java)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
      	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)
      	at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:59)
      	at org.jboss.jsr299.tck.tests.decorators.definition.-906731491$Proxy$_$$_WeldSubclass.deposit(-906731491$Proxy$_$$_WeldSubclass.java)
      

      Attachments

        Issue Links

          Activity

            People

              ajustin@redhat.com Ales Justin
              mkouba@redhat.com Martin Kouba
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: