From 1c23b3fdb25e5d2253aa65e6d8aaec3b939efcdf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 07:45:21 +0000 Subject: [PATCH 1/2] Update dependency com.contentgrid.opa-java-client:opa-async-java-client to v0.4.1 --- thunx-bom/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thunx-bom/build.gradle b/thunx-bom/build.gradle index 962aa764..5f0428bd 100644 --- a/thunx-bom/build.gradle +++ b/thunx-bom/build.gradle @@ -17,7 +17,7 @@ dependencies { api project(':thunx-encoding-json') api project(':thunx-predicates-querydsl') - api 'com.contentgrid.opa-java-client:opa-async-java-client:0.4.0' + api 'com.contentgrid.opa-java-client:opa-async-java-client:0.4.1' } } From 73a88dad2c1c10d09a645547fefdee5234bfa3b8 Mon Sep 17 00:00:00 2001 From: Lars Vierbergen Date: Thu, 17 Aug 2023 10:11:56 +0200 Subject: [PATCH 2/2] Throw UnsupportedOperationException for rego types that are not supported yet --- .../pdp/opa/QuerySetToThunkExpressionConverter.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/thunx-pdp-opa/src/main/java/com/contentgrid/thunx/pdp/opa/QuerySetToThunkExpressionConverter.java b/thunx-pdp-opa/src/main/java/com/contentgrid/thunx/pdp/opa/QuerySetToThunkExpressionConverter.java index 204c4d99..2143f3a3 100644 --- a/thunx-pdp-opa/src/main/java/com/contentgrid/thunx/pdp/opa/QuerySetToThunkExpressionConverter.java +++ b/thunx-pdp-opa/src/main/java/com/contentgrid/thunx/pdp/opa/QuerySetToThunkExpressionConverter.java @@ -11,6 +11,7 @@ import com.contentgrid.opa.rego.ast.Term.Null; import com.contentgrid.opa.rego.ast.Term.Numeric; import com.contentgrid.opa.rego.ast.Term.Ref; +import com.contentgrid.opa.rego.ast.Term.SetTerm; import com.contentgrid.opa.rego.ast.Term.Text; import com.contentgrid.opa.rego.ast.Term.Var; import com.contentgrid.thunx.predicates.model.Comparison; @@ -248,7 +249,7 @@ public ThunkExpression visit(Ref ref) { public ThunkExpression visit(Call call) { // 1st term is the operator // 2nd..Nth term are the arguments - return null; + throw new UnsupportedOperationException(); } @Override @@ -279,7 +280,12 @@ public ThunkExpression visit(Null nullValue) { @Override public ThunkExpression visit(ArrayTerm arrayTerm) { - return null; + throw new UnsupportedOperationException(); + } + + @Override + public ThunkExpression visit(SetTerm setTerm) { + throw new UnsupportedOperationException(); } }