File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
impl/jackson/src/main/java/io/serverlessworkflow/impl/expressions/jq Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 2525import java .time .OffsetDateTime ;
2626import java .util .Collection ;
2727import java .util .Map ;
28+ import java .util .Objects ;
2829import java .util .function .Supplier ;
2930import net .thisptr .jackson .jq .BuiltinFunctionLoader ;
3031import net .thisptr .jackson .jq .Scope ;
@@ -35,7 +36,15 @@ public class JQExpressionFactory extends ObjectExpressionFactory {
3536
3637 private WorkflowModelFactory modelFactory = new JacksonModelFactory ();
3738
38- private static Supplier <Scope > scopeSupplier = new DefaultScopeSupplier ();
39+ private final Supplier <Scope > scopeSupplier ;
40+
41+ public JQExpressionFactory () {
42+ this (new DefaultScopeSupplier ());
43+ }
44+
45+ public JQExpressionFactory (Supplier <Scope > scopeSupplier ) {
46+ this .scopeSupplier = Objects .requireNonNull (scopeSupplier , "scopeSupplier must be not null" );
47+ }
3948
4049 private static class DefaultScopeSupplier implements Supplier <Scope > {
4150 private static class DefaultScope {
You can’t perform that action at this time.
0 commit comments