[weld-dev] Proxyability of private methods

Marius Bogoevici marius.bogoevici at gmail.com
Wed Mar 31 18:02:16 EDT 2010


https://jira.jboss.org/jira/browse/WELD-477

On 2010-03-31, at 5:53 PM, Dan Allen wrote:

> On Wed, Mar 31, 2010 at 3:45 PM, Marius Bogoevici <marius.bogoevici at gmail.com> wrote:
> Hi,
> 
> Looking at: http://www.seamframework.org/Community/ScalaJSF20OnJboss6DeploymentError - the discussion originated in a Scala issue, but, in a more general way, a class like this:
> 
> @SessionScoped
> public class ElusiveClass
> {
> 
>        public void publicBehaviour() {}
>        private final privateBehaviour() {}
> 
> }
> 
> is not proxyable, according to 5.4.1. I wonder if it makes sense to change this in a future revision of the spec, by saying that a proxyable class must not have final methods, *except for the private ones*.
> 
> I don't think that relaxing the conditions in this way would undermine the intent of 5.4.1 as it stands now, since those methods cannot be overridden/proxified anyway.
> 
> WDYT?
> 
> I agree. From an implementation perspective, you could even argue that it was assumed that the statement did not apply to private methods, since it would be difficult (impossible?) to assert that private methods were affected by the proxying anyway. I think we should take the leeway and just allow it in Weld.
> 
> -Dan 
>  
> -- 
> Dan Allen
> Senior Software Engineer, Red Hat | Author of Seam in Action
> Registered Linux User #231597
> 
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
> http://www.google.com/profiles/dan.j.allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20100331/bc75d9ae/attachment-0001.html 


More information about the weld-dev mailing list