[jboss-jira] [JBoss JIRA] (JBEE-159) PropertyNotFoundException when the property is a JDK8 defender method
Tomaz Cerar (JIRA)
issues at jboss.org
Wed Apr 15 09:17:21 EDT 2015
[ https://issues.jboss.org/browse/JBEE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Cerar moved WFLY-3687 to JBEE-159:
----------------------------------------
Project: JBoss JavaEE Spec APIs (was: WildFly)
Key: JBEE-159 (was: WFLY-3687)
Workflow: classic default workflow (was: GIT Pull Request workflow )
Affects Version/s: jboss-el-api_3.0_spec-1.0.2.Final
(was: 8.1.0.Final)
Component/s: jboss-el-api
(was: EE)
> PropertyNotFoundException when the property is a JDK8 defender method
> ---------------------------------------------------------------------
>
> Key: JBEE-159
> URL: https://issues.jboss.org/browse/JBEE-159
> Project: JBoss JavaEE Spec APIs
> Issue Type: Enhancement
> Components: jboss-el-api
> Affects Versions: jboss-el-api_3.0_spec-1.0.2.Final
> Reporter: Rich DiCroce
> Assignee: Tomaz Cerar
> Priority: Minor
> Labels: java8
>
> I have a class that implements an interface that uses Java 8's new defender methods feature. Some getters on the interface have default implementations, and the concrete classes don't override them.
> If I try to refer to one of these getters as a property like so:
> {code:xml}
> value="#{cc.filter.filter.valueChoices}"
> {code}
> Then I get this exception:
> {noformat}
> Caused by: javax.el.PropertyNotFoundException: The class 'com.lapis.jsf.framework.dao.search.DefaultEntityFilter' does not have the property 'valueChoices'.
> at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:731) [jboss-el-api_3.0_spec-1.0.3.Final.jar:1.0.3.Final]
> at javax.el.BeanELResolver.getValue(BeanELResolver.java:351) [jboss-el-api_3.0_spec-1.0.3.Final.jar:1.0.3.Final]
> at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.2.6-jbossorg-4.jar:]
> at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.2.6-jbossorg-4.jar:]
> at com.sun.el.parser.AstValue.getValue(AstValue.java:140) [javax.el-3.0.0.jar:]
> at com.sun.el.parser.AstValue.getValue(AstValue.java:204) [javax.el-3.0.0.jar:]
> at com.sun.el.parser.AstEmpty.getValue(AstEmpty.java:66) [javax.el-3.0.0.jar:]
> at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-3.0.0.jar:]
> at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
> at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
> at com.sun.faces.facelets.el.ContextualCompositeValueExpression.getValue(ContextualCompositeValueExpression.java:158) [jsf-impl-2.2.6-jbossorg-4.jar:]
> at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [jsf-impl-2.2.6-jbossorg-4.jar:]
> ... 68 more
> {noformat}
> Two workarounds exist. One: you can override the default method in a concrete class and have it just call the default super method. Two: you can call the getter using a method expression instead of a value expression.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list