[jboss-jira] [JBoss JIRA] Closed: (JBCOMMON-62) StringPropertyReplacer elides missing properties if it finds others

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Mon Aug 11 14:24:52 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBCOMMON-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry closed JBCOMMON-62.
------------------------------------

    Resolution: Done


> StringPropertyReplacer elides missing properties if it finds others
> -------------------------------------------------------------------
>
>                 Key: JBCOMMON-62
>                 URL: https://jira.jboss.org/jira/browse/JBCOMMON-62
>             Project: JBoss Common
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: common-core (2.x)
>    Affects Versions: 2.2.7.GA
>            Reporter: Brian Stansberry
>            Assignee: Brian Stansberry
>             Fix For: 2.2.8.GA
>
>         Attachments: StringPropertyReplacerUnitTestCase.java
>
>
> Per the StringPropertyReplacer javadoc, an unresolved property should not be replaced:
>  * Go through the input string and replace any occurance of ${p} with
>  * the System.getProperty(p) value. If there is no such property p defined,
>  * then the ${p} reference will remain unchanged.
> This works properly if the entire string being parsed does not include properties that are successfully matched, but if a property is matched, any missing property is elided.
> StringPropertyReplacer.replaceProperties("${java.io.tmpdir}${bogus.property}") should return /tmp${bogus.property} . Currently it returns /tmp.
> Attached StringPropertyReplacerUnitTestCase.testPartialMissing() shows the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list