You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2016/11/01 15:54:58 UTC

[jira] [Created] (SLING-6226) substVars not properly handling unknown properties

Felix Meschberger created SLING-6226:
----------------------------------------

             Summary: substVars not properly handling unknown properties
                 Key: SLING-6226
                 URL: https://issues.apache.org/jira/browse/SLING-6226
             Project: Sling
          Issue Type: Bug
    Affects Versions: Launchpad Base 2.6.14
            Reporter: Felix Meschberger
             Fix For: Launchpad Base 2.6.16


Assuming a property in {{sling.properties}} of the form

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

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Re: [jira] [Created] (SLING-6226) substVars not properly handling unknown properties

Posted by Felix Meschberger <fm...@adobe.com>.
Hi all

I think this works as in „works on my machine“.

Can I have someone please review this patch ?

Thanks
Felix

> Am 01.11.2016 um 16:54 schrieb Felix Meschberger (JIRA) <ji...@apache.org>:
> 
> Felix Meschberger created SLING-6226:
> ----------------------------------------
> 
>             Summary: substVars not properly handling unknown properties
>                 Key: SLING-6226
>                 URL: https://issues.apache.org/jira/browse/SLING-6226
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Launchpad Base 2.6.14
>            Reporter: Felix Meschberger
>             Fix For: Launchpad Base 2.6.16
> 
> 
> Assuming a property in {{sling.properties}} of the form
> 
> {code}
> org.apache.sling.commons.log.pattern=%d{yyyy-MM-dd HH:mm:ss.SSSXXX} *%level* [%thread] %logger %msg%n
> {code}
> 
> 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.
> 
> 
> 
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)