orientdb
orientdb copied to clipboard
NPE in OObjectEntitySerializer.serializeObject() (1.5.0 SNAPSHOT 20130727)
Hi Guys,
When you call OObjectEntitySerializer.serializeObject() with an object which's class contains an untyped collection (i.e. a Set), a NPE will be thrown.
I chased the issue and found that getGenericMultivalueType() inside OReflectionHelper has an expression if (genericType != null && genericType instanceof ParameterizedType) which will fail in case the collection not being parametrized and thus return null, which leads to the NPE.
So either this is an issue that needs to be fixed or (collections need to be parametrized generally) the null situation should be catched.
Regards, Markus
Fixed in 1.5-SNAPSHOT