When calling retrieveObject in ETClient with a filter that produces no results, i.e. the key doesn't exist, the individualResults field in ETResponse is empty so the condition if( individualResults.size() == 0) passes and null is returned for getResult(). The call of getResult().getObject() in ETResponse's getObject method then causes a NullPointerException.
The response should be checked for null condition, and if it is null, return null as the result object.
When calling
retrieveObject
inETClient
with a filter that produces no results, i.e. the key doesn't exist, theindividualResults
field inETResponse
is empty so the conditionif( individualResults.size() == 0)
passes and null is returned forgetResult()
. The call ofgetResult().getObject()
inETResponse
'sgetObject
method then causes aNullPointerException
.The response should be checked for null condition, and if it is null, return null as the result object.