Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1445

Joran's PropertySetter::addBasicProperty doesn't work when the basic property followsTheValueOfConvention

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.5.7
    • 1.3.0-alpha4
    • Joran
    • None

    Description

      The Joran code for supporting custom properties goes to great lengths to ensure that a basic property can be created from a string. In particular Joran supports basic properties where the type of the property is a class containing a `public static valueOf(String str)`. Joran will go through lots of checks before creating an instance of this class (via the valueOf) method and then, at the last second, not use that class instance at all and try to call the property setter with the original string. Naturally, since the setter is expecting specific class instance and not a String instance the call fails with an InvalidArgumentException. The fix is actually quite simple and is contained in this pull request:  https://github.com/qos-ch/logback/pull/442

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            slessard Steve Lessard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: