rmannibucau commented on code in PR #89:
URL: https://github.com/apache/openwebbeans/pull/89#discussion_r1667722264


##########
webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java:
##########
@@ -88,6 +92,8 @@ protected AbstractOwbBean(WebBeansContext webBeansContext,
         this.webBeansType = webBeansType;
         this.beanClass = beanClass;
         this.webBeansContext = webBeansContext;
+
+        returnType = (Class<T>) 
WebBeansUtil.resolveReturnType(beanAttributes.getTypes());

Review Comment:
   this looks neat but is kind of against the spec which explicit states what 
`beanClass` is:
   
   > getBeanClass() returns the bean class of the managed bean or of the bean 
that declares the producer method or field.
   
   So for me there is no ambiguity but I ack some extensions are buggy and 
don't comply to CDI (using extension class or Object, they should define it to 
the main bean class type - potentially without generics)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@openwebbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to