[jboss-jira] [JBoss JIRA] (JBRULES-3247) PlanningEntityDescriptor does not support write-only properties
Cédric Schaller (Closed) (JIRA)
jira-events at lists.jboss.org
Thu Oct 27 04:02:57 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cédric Schaller closed JBRULES-3247.
------------------------------------
Code reviewed
> PlanningEntityDescriptor does not support write-only properties
> ---------------------------------------------------------------
>
> Key: JBRULES-3247
> URL: https://issues.jboss.org/browse/JBRULES-3247
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-planner
> Affects Versions: 5.3.0.CR1
> Reporter: Cédric Schaller
> Assignee: Geoffrey De Smet
> Fix For: 5.4.0.Beta1
>
> Original Estimate: 5 minutes
> Remaining Estimate: 5 minutes
>
> The following code:
> {code:java}
> Method propertyGetter = propertyDescriptor.getReadMethod();
> if (propertyGetter.isAnnotationPresent(PlanningVariable.class)) {
> {code}
> in method {{processPropertyAnnotations()}} assumes that properties always have getters. However, the method {{getReadMethod()}} might indeed return {{null}} if the property is write-only, as explained in the JavaBeans(TM) Specification 1.01 Final Release. A null-check should therefore be added in order to prevent NullPointerExceptions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list