Closed sakama closed 7 years ago
@sakama Thanks!
Looked into that part again, and finally I thought it could be better to guarantee that JacksonServiceValue
does not contain Java's null
directly. (Sorry to change my mind.)
What do you think to have the following in the constructor?
if (value == null) {
this.value = new NullNode();
} else {
this.value = value;
}
@dmikurube Looks good. It's much better than null check.
Minor comment but NullNode()
has private access.
So NullNode.getInstance()
instead of new NullNode()
?
Above one works fine with my model&data.
And I added commits ac384ad.
I got following failure and fixed it. This failure happens because Web API doesn't returns record itself when its value is null.
Models
API response
Stacktrace
I found that
BooleanValueImport.findAndImportValue()
has null check logic, but always returnsfalse
andJacksonServiceValue.isNull()
throws NullPointerException.BooleanValueImport.java
So I added additional null check logic to
JacksonServiceValue.isNull()
method.