diff options
Diffstat (limited to 'java/broker-core/src')
-rw-r--r-- | java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java b/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java index baf20da486..41578272f7 100644 --- a/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java +++ b/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java @@ -1361,6 +1361,7 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im Map<String,String> inheritedContext = new HashMap<String, String>(); generateInheritedContext(object.getModel(), object, inheritedContext); return Strings.expand(value, false, + JSON_SUBSTITUTION_RESOLVER, getOwnAttributeResolver(object), new Strings.MapResolver(inheritedContext), Strings.JAVA_SYS_PROPS_RESOLVER, @@ -1395,6 +1396,16 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im } + private static final Strings.Resolver JSON_SUBSTITUTION_RESOLVER = + Strings.createSubstitutionResolver("json:", + new LinkedHashMap<String, String>() + { + { + put("\\","\\\\"); + put("\"","\\\""); + } + }); + private static class OwnAttributeResolver implements Strings.Resolver { private static final Module _module; @@ -1432,7 +1443,7 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im } @Override - public String resolve(final String variable) + public String resolve(final String variable, final Strings.Resolver resolver) { boolean clearStack = false; Set<String> currentStack = _stack.get(); |