From 308c2a877fdae097e96e07a157cbc78c9d9123d4 Mon Sep 17 00:00:00 2001 From: dvgaba Date: Mon, 15 Jan 2024 21:36:23 -0500 Subject: [PATCH] Release 1.1.0 (#23) 3PP Version Bumps --- README.md | 4 +++ easy-rules-archetype/pom.xml | 2 +- easy-rules-core/pom.xml | 15 ++++----- easy-rules-jexl/pom.xml | 7 ++-- .../java/org/jeasy/rules/jexl/JexlRule.java | 3 +- .../org/jeasy/rules/jexl/JexlActionTest.java | 7 ++-- easy-rules-mvel/pom.xml | 5 +-- easy-rules-spel/pom.xml | 5 +-- easy-rules-support/pom.xml | 6 +--- easy-rules-tutorials/pom.xml | 2 +- pom.xml | 33 ++++++++++++++++--- 11 files changed, 52 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index fd3f855..d2fe501 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ in maintenance mode. Current plan is to support community with minor enhancement ## Latest news +* 01/15/2024: Version 1.1.0 is out + * 3PP Version bumps + * easy-rules-jexl - Breaking change due to bump to Jexl 3.3 + * 02/13/2023: Version 1.0.7 is out Minor release to fix jackson vulnerability diff --git a/easy-rules-archetype/pom.xml b/easy-rules-archetype/pom.xml index 7d03ab9..960127a 100755 --- a/easy-rules-archetype/pom.xml +++ b/easy-rules-archetype/pom.xml @@ -2,7 +2,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 4.0.0 diff --git a/easy-rules-core/pom.xml b/easy-rules-core/pom.xml index 55f3849..8fc0fb0 100644 --- a/easy-rules-core/pom.xml +++ b/easy-rules-core/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 easy-rules-core @@ -68,26 +68,23 @@ test - org.junit.jupiter - junit-jupiter-api - 5.8.2 + org.mockito + mockito-core test org.junit.jupiter - junit-jupiter-engine - 5.8.2 + junit-jupiter-api test - org.mockito - mockito-core + org.junit.jupiter + junit-jupiter-engine test org.mockito mockito-junit-jupiter - 4.2.0 test diff --git a/easy-rules-jexl/pom.xml b/easy-rules-jexl/pom.xml index cffb7a3..051610e 100644 --- a/easy-rules-jexl/pom.xml +++ b/easy-rules-jexl/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 easy-rules-jexl @@ -13,7 +13,7 @@ JEXL integration module - 3.2.1 + 3.3 @@ -79,19 +79,16 @@ org.junit.jupiter junit-jupiter-api - 5.8.2 test org.junit.jupiter junit-jupiter-engine - 5.8.2 test org.junit.jupiter junit-jupiter-params - 5.8.2 test diff --git a/easy-rules-jexl/src/main/java/org/jeasy/rules/jexl/JexlRule.java b/easy-rules-jexl/src/main/java/org/jeasy/rules/jexl/JexlRule.java index 27f95cc..57a94fc 100644 --- a/easy-rules-jexl/src/main/java/org/jeasy/rules/jexl/JexlRule.java +++ b/easy-rules-jexl/src/main/java/org/jeasy/rules/jexl/JexlRule.java @@ -28,6 +28,7 @@ import java.util.Objects; import org.apache.commons.jexl3.JexlBuilder; import org.apache.commons.jexl3.JexlEngine; +import org.apache.commons.jexl3.introspection.JexlPermissions; import org.jeasy.rules.api.Action; import org.jeasy.rules.api.Condition; import org.jeasy.rules.api.Facts; @@ -40,7 +41,7 @@ */ public class JexlRule extends BasicRule { - static final JexlEngine DEFAULT_JEXL = new JexlBuilder().safe(false).create(); + static final JexlEngine DEFAULT_JEXL = new JexlBuilder().permissions(JexlPermissions.UNRESTRICTED).safe(false).create(); private Condition condition = Condition.FALSE; private final List actions = new ArrayList<>(); diff --git a/easy-rules-jexl/src/test/java/org/jeasy/rules/jexl/JexlActionTest.java b/easy-rules-jexl/src/test/java/org/jeasy/rules/jexl/JexlActionTest.java index 8cf4cb5..f8dbf6b 100644 --- a/easy-rules-jexl/src/test/java/org/jeasy/rules/jexl/JexlActionTest.java +++ b/easy-rules-jexl/src/test/java/org/jeasy/rules/jexl/JexlActionTest.java @@ -34,6 +34,7 @@ import org.apache.commons.jexl3.JexlBuilder; import org.apache.commons.jexl3.JexlEngine; import org.apache.commons.jexl3.JexlException; +import org.apache.commons.jexl3.introspection.JexlPermissions; import org.apache.commons.jexl3.introspection.JexlSandbox; import org.assertj.core.api.Assertions; import org.jeasy.rules.api.Action; @@ -49,7 +50,7 @@ public class JexlActionTest { @Test void testJexlActionExecution() throws Exception { // given - Action markAsAdult = new JexlAction("person.setAdult(true);"); + Action markAsAdult = new JexlAction("person.setAdult(true)"); Facts facts = new Facts(); Person foo = new Person("foo", 20); facts.put("person", foo); @@ -94,7 +95,7 @@ void testJexlActionExecutionWithFailure() throws Exception { Assertions.assertThatThrownBy(() -> action.execute(facts)) .isInstanceOf(JexlException.Method.class) .hasMessage( - "org.jeasy.rules.jexl.JexlAction.:49 unsolvable function/method 'setBlah(Boolean)'"); + "org.jeasy.rules.jexl.JexlAction.:49@1:7 unsolvable function/method 'setBlah(Boolean)'"); // then // excepted exception @@ -147,7 +148,7 @@ void testWithWhiteSandbox() { sandbox.white(System.class.getName()).execute("currentTimeMillis"); Map namespaces = new HashMap<>(); namespaces.put("s", System.class); - JexlEngine jexl = new JexlBuilder().sandbox(sandbox).namespaces(namespaces).create(); + JexlEngine jexl = new JexlBuilder().permissions(JexlPermissions.UNRESTRICTED).sandbox(sandbox).namespaces(namespaces).create(); Facts facts = new Facts(); AtomicLong atomicLong = new AtomicLong(); facts.put("result", atomicLong); diff --git a/easy-rules-mvel/pom.xml b/easy-rules-mvel/pom.xml index 10f0955..8be7c15 100644 --- a/easy-rules-mvel/pom.xml +++ b/easy-rules-mvel/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 easy-rules-mvel @@ -79,19 +79,16 @@ org.junit.jupiter junit-jupiter-api - 5.8.2 test org.junit.jupiter junit-jupiter-engine - 5.8.2 test org.junit.jupiter junit-jupiter-params - 5.8.2 test diff --git a/easy-rules-spel/pom.xml b/easy-rules-spel/pom.xml index 32ca266..7b552a2 100644 --- a/easy-rules-spel/pom.xml +++ b/easy-rules-spel/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 easy-rules-spel @@ -85,19 +85,16 @@ org.junit.jupiter junit-jupiter-api - 5.8.2 test org.junit.jupiter junit-jupiter-engine - 5.8.2 test org.junit.jupiter junit-jupiter-params - 5.8.2 test diff --git a/easy-rules-support/pom.xml b/easy-rules-support/pom.xml index 50befa8..9a6daca 100644 --- a/easy-rules-support/pom.xml +++ b/easy-rules-support/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 easy-rules-support @@ -80,19 +80,16 @@ org.junit.jupiter junit-jupiter-api - 5.8.2 test org.junit.jupiter junit-jupiter-engine - 5.8.2 test org.junit.jupiter junit-jupiter-params - 5.8.2 test @@ -103,7 +100,6 @@ org.mockito mockito-junit-jupiter - 4.2.0 test diff --git a/easy-rules-tutorials/pom.xml b/easy-rules-tutorials/pom.xml index bb70146..05cb89c 100644 --- a/easy-rules-tutorials/pom.xml +++ b/easy-rules-tutorials/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 easy-rules-tutorials diff --git a/pom.xml b/pom.xml index dbc7235..3529b03 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-rules - 1.0.7 + 1.1.0 easy-rules-archetype @@ -26,11 +26,11 @@ UTF-8 11 4.13.2 - 3.22.0 - 4.4.0 + 3.25.1 + 5.9.0 1.2.1 1.7.36 - 2.14.2 + 2.16.1 3.0.2 2.5.3 3.8.1 @@ -38,6 +38,7 @@ 3.2.0 3.0 1.4.1 + 5.10.1 @@ -109,12 +110,36 @@ ${assertj.version} test + + org.junit.jupiter + junit-jupiter-api + ${junit-jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit-jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit-jupiter.version} + test + org.mockito mockito-core ${mockito.version} test + + org.mockito + mockito-junit-jupiter + ${mockito.version} + test + com.google.code.findbugs jsr305