[JAVA-4119] NPE in PojoBuilderHelper where static methods follow bean convention Created: 27/Apr/21 Updated: 28/Oct/23 Resolved: 14/May/21 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.0 |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Sk Iv | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Classes that have a static method that follows the bean convention cause a NPE. For example:
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. 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. |
| Comments |
| Comment by Githook User [ 12/May/21 ] |
|
Author: {'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}Message: Fix NPE in PojoBuilderHelper where static methods follow bean convention
|
| Comment by Ross Lawley [ 11/May/21 ] |
| Comment by Esha Bhargava [ 27/Apr/21 ] |
|
iskvort@gmail.com Thank you for reporting this issue. We'll look into it and get back to you soon. |