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

    • Improvement
    • Resolution: Fixed
    • Major
    • 12.0-rc-1
    • 11.10.2
    • Configuration
    • None
    • Unknown
    • N/A
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: