Skip to content

Commit 5008b2a

Browse files
committed
Prevent NPE error in Pojo's with synthetic properties
JAVA-3915
1 parent 277585c commit 5008b2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bson/src/main/org/bson/codecs/pojo/PojoBuilderHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ private static <T, S> PropertyMetadata<T> getOrCreateMethodPropertyMetadata(fina
166166
}
167167

168168
private static boolean isAssignableClass(final Class<?> propertyTypeClass, final Class<?> typeDataClass) {
169+
notNull("propertyTypeClass", propertyTypeClass);
170+
notNull("typeDataClass", typeDataClass);
169171
return propertyTypeClass.isAssignableFrom(typeDataClass) || typeDataClass.isAssignableFrom(propertyTypeClass);
170172
}
171173

0 commit comments

Comments
 (0)