Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5467

TypeMappingImpl does not support wilcards in generic types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.4
    • Fix Version/s: 5.2.1
    • Component/s: content2bean
    • Labels:
    • Patch included:
      Yes
    • Testcase included:
      Yes
    • Epic Link:

      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)
      

        Attachments

          Activity

            People

            Assignee:
            jsimak Jaroslav Simak
            Reporter:
            dmoss David Moss
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: