Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
8.6.1
-
None
Description
I am getting error: Method [public boolean cz.kb.dcs.module_transaction.api.data_objects.cexi.TransactionFormItem.isInstantPayment()]. Can't convert null value to a primitive class: boolean
This is due to
if (setMethod != null) { // getMethod is always there and if the value will be set through a setMethod then // the getMethod return type will be its type. Else we have to look at the // parameters if the setter but getting the return type is quicker type = getMethod.getReturnType(); }
I have this getter and setter:
public boolean isInstantPayment() { return instantPayment == null ? false : instantPayment.booleanValue(); } public void setInstantPayment(final Boolean instantPayment) { this.instantPayment = instantPayment; }
So setting NULL would be possible (the property itself is object Boolean). Although it is not according to Java Beans specification.