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

TypeMappingImpl does not support wilcards in generic types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 5.2.1
    • 5.0.4
    • content2bean

      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)
      

        Acceptance criteria

          1. MAGNOLIA-5467.patch
            8 kB
            Jaroslav Simak
          2. TypeMappingImplTest.java
            2 kB
            David Moss

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

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD