]
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: