Nullcheck in JOXBeanOutput.formatValue before line: 590
Brought to you by:
wutka
There should be a check if value is null before calling value.getClass(). Otherwise there will be a NullpointerException and the checks in the return-statements are useless.
The easiest way fixing this problem would be changing the statment:
Class type = value.getClass();
to:
Class type = (value !=null) ? value.getClass() : String.class;
due to this change, all other nullchecks could be removed, except the nullcheck for String-values on line 607.
the file with the proposed correcture
The Nullpointer occurs if an Array contains null.