-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Classes that have a static method that follows the bean convention cause a NPE.
For example:
public static void getStringField$Annotations() { // Mimics the static kotlin synthetic annotations field }
An example where this can automatically occur is when using annotations in Kotlin on non data classes.
Was: NPE in PojoBuilderHelper class for object with custom annotation
Hi I have a project (Kotlin + Spring Boot Data) which fails with null pointer exception when upsert is happening.
I've prepared test project to reproduce the issue: https://github.com/Skiv1989/spring-data-mongo-test
If you run the project it will try to store TestDto class, the class has an field with @SearchCriteria annotation. If I got correctly pojo converter thinks that annotation is a class field and trying to map it, which leads to NPE
Can you check please or advise how to avoid such exception?
As temporary solution I've made copy of dto classes, but without annotations and then maps dto to dom before store, but classes are absolutely same, so I want to avoid this duplication.
- is duplicated by
-
JAVA-4209 Add support for void types in Pojo's
- Closed