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 25
25
import java .time .OffsetDateTime ;
26
26
import java .util .Collection ;
27
27
import java .util .Map ;
28
+ import java .util .Objects ;
28
29
import java .util .function .Supplier ;
29
30
import net .thisptr .jackson .jq .BuiltinFunctionLoader ;
30
31
import net .thisptr .jackson .jq .Scope ;
@@ -35,7 +36,15 @@ public class JQExpressionFactory extends ObjectExpressionFactory {
35
36
36
37
private WorkflowModelFactory modelFactory = new JacksonModelFactory ();
37
38
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
+ }
39
48
40
49
private static class DefaultScopeSupplier implements Supplier <Scope > {
41
50
private static class DefaultScope {
You can’t perform that action at this time.
0 commit comments