diff --git a/openidm-script/src/main/java/org/forgerock/openidm/script/impl/ScriptRegistryService.java b/openidm-script/src/main/java/org/forgerock/openidm/script/impl/ScriptRegistryService.java index 2e7081406..f6db6e8a4 100644 --- a/openidm-script/src/main/java/org/forgerock/openidm/script/impl/ScriptRegistryService.java +++ b/openidm-script/src/main/java/org/forgerock/openidm/script/impl/ScriptRegistryService.java @@ -650,7 +650,7 @@ public Object call(Parameter scope, Function callback, Object... arguments) result = propertiesCache.get(name); } if (null == result) { - Object defaultValue = arguments.length == 2 ? arguments[1] : null; + Object defaultValue = arguments.length > 1 ? arguments[1] : null; result = IdentityServer.getInstance().getProperty(name, defaultValue, Object.class); propertiesCache.putIfAbsent(name, result); }