Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1584

Add support for converters not associated to a specific type

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 10.11.3
    • Properties
    • None
    • Unknown

    Description

      We have the need to convert the same way several types sometimes. Currently it's been worked around two ways:

      • try to associated a converter with various "final" types (Hashtable, HashMap, LinkedHashMap) but it can quickly look a bit ridiculous
      • hardcode a crappy if like we do for enum support

      The idea would be to have 3 steps instead of the current 2:

      • check if there is a Converter component register for a specific Type
      • if none is found ask all UntypedConverter if they want to take care of the conversion (that's where we could move enum and Map support for example and add other things like Type)
      • fallback on beanutils

      Attachments

        Activity

          People

            Unassigned Unassigned
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: