Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6065

The Converter doesn't support Wildcard types

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: converter-1.0.2
    • Fix Version/s: converter-1.0.8
    • Component/s: Converter
    • Labels:
      None

      Description

      If you pass a wildcard type to the converter then it fails to do the conversion. This is an odd thing to do, but it is definitely possible to work out what the type is.

       

      For example:

          to(new TypeReference<Map<String, ?>>(){});

       

      can be converted to a Map<String, Object>, and 

          to(new TypeReference<Map<String, ? extends List<String>>>(){});

      can be converted to a Map<String, List<String>>

       

      It is unclear what it would mean to use

      {{ to(new TypeReference<Map<String, ? super Integer>(){});}}

        Attachments

          Activity

            People

            • Assignee:
              timothyjward Timothy James Ward
              Reporter:
              timothyjward Timothy James Ward
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: