diff --git a/hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/query/graph/JXPathAttribute.java b/hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/query/graph/JXPathAttribute.java index 2be5b4c7c8..a584a94dcb 100644 --- a/hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/query/graph/JXPathAttribute.java +++ b/hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/query/graph/JXPathAttribute.java @@ -1,5 +1,6 @@ package pl.allegro.tech.hermes.management.infrastructure.query.graph; +import org.apache.commons.jxpath.FunctionLibrary; import org.apache.commons.jxpath.JXPathContext; public class JXPathAttribute implements ObjectAttribute { @@ -15,6 +16,8 @@ public JXPathAttribute(Object target, String path) { @Override public Object value() { - return JXPathContext.newContext(target).getValue(path); + JXPathContext context = JXPathContext.newContext(target); + context.setFunctions(new FunctionLibrary()); + return context.getValue(path); } }