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

Allow to use ConfigurationSource#getProperty with both a defined class and a defaultValue

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.10.2
    • Fix Version/s: 12.0-rc-1
    • Component/s: Configuration
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Right now it's possible to call getProperty either with a Class or with a defaultValue: in this case, the class of the default value is used to know what the return type should be for the property.
      However this might be wrong when we want an interface and not the concrete class as return type: for example using getProperty with a LinkedList as default value, when we just want a List as return type.

      So we should have a dedicated method to specify both the expected Class and the defaultValue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              surli Simon Urli
              Reporter:
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: