[jboss-jira] [JBoss JIRA] (WFLY-3456) Can not call method with generic type parameter with null value
Tamas Bodis (JIRA)
issues at jboss.org
Wed Jul 15 03:46:05 EDT 2015
[ https://issues.jboss.org/browse/WFLY-3456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089562#comment-13089562 ]
Tamas Bodis commented on WFLY-3456:
-----------------------------------
With this modification (in WildFly 9.0.0.Final) we cannot access now the 'bridge' methods.
This makes sense for the first time, but now if we try to call a package private class's public method through a public subclass, than we cannot reach it (MethodNotFoundException) because _from outside_ we see that method as a bridge method. Like in this example:
{code:title=Parent.java|borderStyle=solid}
class Parent {
public String methodToCall() {
return "value";
}
}
{code}
{code:title=Child.java|borderStyle=solid}
public class Child extends Parent {
}
{code}
{code:title=test.jsp|borderStyle=solid}
${child.methodToCall()}
{code}
And because there are frameworks (like Spring Data in our case) which use this kind of API encapsulation we cannot switch to WildFly9 easily. Do you have any idea how to solve this problem in general in the future releases?
> Can not call method with generic type parameter with null value
> ---------------------------------------------------------------
>
> Key: WFLY-3456
> URL: https://issues.jboss.org/browse/WFLY-3456
> Project: WildFly
> Issue Type: Bug
> Components: JSF
> Affects Versions: 8.1.0.Final
> Reporter: Marcel Neuwohner
> Assignee: Farah Juma
> Fix For: 9.0.0.Alpha1
>
>
> If you call a method with a generic type parameter from EL with null as parameter value you get
> {code}
> javax.el.MethodNotFoundException
> Unable to find unambiguous method: SimpleOrderHandler$Proxy$_$$_WeldClientProxy.getLastUpdate(null)
> at
> javax.el.Util.findWrapper(Util.java:322)
> javax.el.Util.findMethod(Util.java:203)
> javax.el.ELUtil.findMethod(ELUtil.java:288)
> javax.el.BeanELResolver.invoke(BeanELResolver.java:527)
> javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
> com.sun.el.parser.AstValue.getValue(AstValue.java:136)
> com.sun.el.parser.AstValue.getValue(AstValue.java:204)
> com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
> org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
> com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list