[
https://issues.jboss.org/browse/JBMETA-371?page=com.atlassian.jira.plugin...
]
Brian Stansberry commented on JBMETA-371:
-----------------------------------------
No, its design is wrong given the requirements. The requirement was to support vault
expressions, and this can't. We wouldn't have bothered with the PropertyResolver
notion if we weren't aiming to get vault expression support.
This could be replaced by an ExpressionReplacer + ExpressionResolver which separates the
concerns better. The ExpressionReplacer simply looks for ${} and passes the contents
therein to ExpressionResolver. The ExpressionResolver deals with the format of the
expression.
I'll file a separate issue for that as it's too big a change to do, particularly
for any backport. Plus I have no time. ;) Doing it with the current stuff would require
changing the contract of PropertyResolver.
I think I have a fairly simple but hacky fix for what we have now. Knock on wood.
DefaultPropertyReplacer + PropertyResolver is broken for vault
expressions
--------------------------------------------------------------------------
Key: JBMETA-371
URL:
https://issues.jboss.org/browse/JBMETA-371
Project: JBoss Metadata
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: common
Affects Versions: 7.0.4
Reporter: Brian Stansberry
Assignee: Brian Stansberry
The DefaultPropertyReplacer + PropertyResolver algorithm is broken for vault expressions.
It's based on the assumption that the contents of the expression string between
"${" and "}" have a fixed format a la the old JBoss AS system
properties (e.g. propertyname[: default value]) and then the PropertyResolver tries to
resolve "propertyname".
This is incorrect in the case of vault expressions, which do not follow this format. In
particular the ":" char appears multiple places in a vault expression and does
not serve as a delimiter between "propertyname" and "default value".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira