[JAVA-2799] Enum is handled as POJO when coexists in the same package as the rest of the POJO classes Created: 05/Mar/18 Updated: 28/Oct/23 Resolved: 07/Mar/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Codecs |
| Affects Version/s: | 3.6.3 |
| Fix Version/s: | 3.6.4, 3.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Igal Rivin (Inactive) | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When an enum exists in the same package as POJO classes, its type is handled as a POJO and not as an enum.
The workaround on this issue might be registering specific classes in PojoCodecProvider rather than a package name, but its not very convenient. Thanks, |
| Comments |
| Comment by Githook User [ 07/Mar/18 ] |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Fix PojoCodecProvider handling of registered packages Ensure registered packages and automatic codecs work in the
|
| Comment by Githook User [ 07/Mar/18 ] |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Fix PojoCodecProvider handling of registered packages Ensure registered packages and automatic codecs work in the
|
| Comment by Ross Lawley [ 06/Mar/18 ] |
| Comment by Ross Lawley [ 05/Mar/18 ] |
|
Looking at the error message, it looks like the PojoCodec is not delegating to its internal Enum handling, for whatever reason. |
| Comment by Igal Rivin (Inactive) [ 05/Mar/18 ] |
|
Hi ross.lawley, I tried that too. -Igal |
| Comment by Ross Lawley [ 05/Mar/18 ] |
|
igal.rivin I think it may be an issue with nested Enums not being supported. Does splitting out the enum (so its not embedded in a class) fix the issue? |