orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

NPE in OObjectEntitySerializer.serializeObject() (1.5.0 SNAPSHOT 20130727)

Open morphace opened this issue 13 years ago • 1 comments

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

morphace avatar Jul 29 '13 08:07 morphace

Fixed in 1.5-SNAPSHOT

MaDaPHaKa avatar Jul 29 '13 18:07 MaDaPHaKa