[MAGNOLIA-5467] TypeMappingImpl does not support wilcards in generic types Created: 08/Nov/13 Updated: 12/Dec/13 Resolved: 10/Dec/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | content2bean |
| Affects Version/s: | 5.0.4 |
| Fix Version/s: | 5.2.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Moss | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | next | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Patch included: |
Yes
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Testcase included: |
Yes
|
||||
| Date of First Response: | |||||
| Epic Link: | Support | ||||
| Description |
|
TypeMappingImpl.getPropertyTypeDescriptor is able to process classes with properties that do not contain wildcard types, but if the class has any properties with wildcards, e.g. Set<? extends Number> the code throws the following exception: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.Class at info.magnolia.jcr.node2bean.impl.TypeMappingImpl.inferGenericTypes(TypeMappingImpl.java:151) at info.magnolia.jcr.node2bean.impl.TypeMappingImpl.getPropertyTypeDescriptor(TypeMappingImpl.java:109) |
| Comments |
| Comment by Jaroslav Simak [ 21/Nov/13 ] |
|
patch attached |
| Comment by Daniel Lipp [ 21/Nov/13 ] |
|
Thx for reporting David - and thx for the patch Jaroslav. We'll fix in 5.2.1. |