[cdi-dev] [JBoss JIRA] (CDI-527) allow proxying of classes with non-private final methods

Martin Kouba (JIRA) issues at jboss.org
Mon Oct 26 03:20:02 EDT 2015

    [ https://issues.jboss.org/browse/CDI-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121824#comment-13121824 ] 

Martin Kouba commented on CDI-527:

[~struberg] Yes, it is about bean types. But the validation requirement is clearly defined:
bq.  A bean type must be proxyable if an injection point resolves to a bean... Otherwise, the container automatically detects the problem, and treats it as a deployment problem.
For extensions, EL, etc. - you get {{UnproxyableResolutionException}} at runtime. Also note that a contextual reference is not required to implement all bean types of the bean. Only the required bean type and all interfaces (see 6.5.3. Contextual reference for a bean).

> allow proxying of classes with non-private final methods
> --------------------------------------------------------
>                 Key: CDI-527
>                 URL: https://issues.jboss.org/browse/CDI-527
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Beans
>    Affects Versions: 1.2.Final
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 2.0 (proposed)
> Currently we explicitly disallow proxying of classes with non-private final methods. 
> EJB _does_ allow this. And there are a few final methods in the JDK and other libs. E.g. HashMap#initHashSeedAsNeeded. Currently we cannot have a producer method for it.
> We might rethink our decision and allow it. Probably with an own annotation like @AllowProxying which disables this check for certain cases (subclass managed-beans or producers).

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list