[JAVA-2653] POJO that implements a generic interface cannot be serialized Created: 06/Nov/17 Updated: 29/Oct/23 Resolved: 04/Dec/17 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | POJO |
| Affects Version/s: | 3.5.0 |
| Fix Version/s: | 3.6.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Zoe Snape | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
I ran into a problem with POJO classes that implement a generic interface. Basically, the getDeclaredMethods function used in PojoBuilderHelper returns signatures for both the generic property type and the actual property type and then it gets upset because it thinks there are two methods with the same name and different types. I've attached a minimal example that demonstrates this issue. Unfortunately, due to |
| Comments |
| Comment by Githook User [ 04/Dec/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'username': 'rozza', 'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley'}Message: PojoCodec - Added test for generic interfaces
| |||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ross Lawley [ 04/Dec/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||
|
This was fixed as part of other PojoCodec updates. | |||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 04/Dec/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'username': 'rozza', 'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley'}Message: PojoCodec - Added test for generic interfaces
| |||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 06/Nov/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||
|
So that others don't have to download the attached file, I'm pasting the code here as well:
|