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

Mark Struberg (JIRA) issues at jboss.org
Tue Dec 15 06:35:00 EST 2015

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

Mark Struberg commented on CDI-527:

[~emilyj] Also remember that CDI-1.2 is only specified for Java7.  Also note that EJB doesn't support this neither for NIVs...
How would D look like in practice? System properties and excludes can be done in a non-portable way anyway. But adding system properties to any spec is in 99% a sign of a broken design.

-1 for B. Just added it for completeness ;)

We also could have another option
E.) introduce some class excludes via beans.xml

But that would have the same issues like D imo. 

Imo C is the most explicit and easiest for users to grasp. 

> 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