Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6226

substVars not properly handling unknown properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Launchpad Base 2.6.14
    • Launchpad Base 2.6.16
    • None
    • None
    • Patch

    Description

      Assuming a property in sling.properties of the form

      org.apache.sling.commons.log.pattern=%d{yyyy-MM-dd HH:mm:ss.SSSXXX} *%level* [%thread] %logger %msg%n
      

      This will break during Sling startup as the date format of this log.pattern ends with a curly brace but is not matched with a {{ ${ }}. This is a but in the substVars method.

      Another problem is that this method is duplicate in the Sling and SlingServlet classes where the latter is in the web app class loader while the former already is in the launcher class loader.

      Proposing a patch taking the latest Felix Framework's Util class creating a new Util class in the shared package.

      Attachments

        1. SLING-6226.diff
          24 kB
          Felix Meschberger

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: