I have a setter which does no accept null values for a list, ie:

public void setObjects(List<Object> objects){
if (objects == null) throw new NullPointerException("null not permitted");
   this.objects = objects;
}

I did not find yet any decent way to map a nullvalue to an empty list, I was thinking of using a specific TypeHandlerCallback on this property on the result map but did not go this route yet.

For now dumbest thing I could do was to remove the check and do nothing if objects is null, other possibility include an intermediate holder object...or ?

Any suggestions welcome.

-- stephane

Reply via email to