jungm commented on code in PR #89: URL: https://github.com/apache/openwebbeans/pull/89#discussion_r1667735582
########## 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: Hmm not sure if synthetic beans are managed beans: https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0#implementation > Portable extensions and build compatible extensions may provide other kinds of beans. This implies that beans added via a portable extension are not necessarily managed beans -> the restriction in the javadoc does not necessarily apply IMO which means OWB can't rely on beanClass to be something meaningful or even represent the type of the Bean (which is the case here) Even if that is not the case and beans registered via a portable extension are indeed managed.. Is there a requirement for OWB to use beanClass to determine which type to proxy? (At least can't find something in the specs quickly searching through it) Looking for the most specific [type](https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0#bean_types) in getTypes _should_ also be sufficient I think But I could also be completely wrong here and this discussion really should happen on the Mojarra/Weld side 😉 -- 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