This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git
The following commit(s) were added to refs/heads/master by this push: new c07ee17 put back old code + remove duplicate EL API c07ee17 is described below commit c07ee17a4c3e2547073eec209a9a6f72aacc20ad Author: Thomas Andraschko <tandrasc...@apache.org> AuthorDate: Wed Feb 8 15:40:33 2023 +0100 put back old code + remove duplicate EL API --- bval-jsr/pom.xml | 6 ++++++ .../org/apache/bval/jsr/DefaultMessageInterpolatorTest.java | 10 ++++------ bval-perf/pom.xml | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bval-jsr/pom.xml b/bval-jsr/pom.xml index ce62dda..756e98a 100644 --- a/bval-jsr/pom.xml +++ b/bval-jsr/pom.xml @@ -163,6 +163,12 @@ <version>4.0.1</version> <scope>provided</scope> <optional>true</optional> + <exclusions> + <exclusion> + <groupId>jakarta.el</groupId> + <artifactId>jakarta.el-api</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.tomcat</groupId> diff --git a/bval-jsr/src/test/java/org/apache/bval/jsr/DefaultMessageInterpolatorTest.java b/bval-jsr/src/test/java/org/apache/bval/jsr/DefaultMessageInterpolatorTest.java index fa471a8..5ad3929 100644 --- a/bval-jsr/src/test/java/org/apache/bval/jsr/DefaultMessageInterpolatorTest.java +++ b/bval-jsr/src/test/java/org/apache/bval/jsr/DefaultMessageInterpolatorTest.java @@ -29,10 +29,7 @@ import static org.mockito.Mockito.when; import java.lang.annotation.Annotation; import java.net.URL; import java.net.URLClassLoader; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; -import java.util.Objects; +import java.util.*; import java.util.function.Predicate; import java.util.function.Supplier; @@ -94,7 +91,7 @@ public class DefaultMessageInterpolatorTest { // store and replace CCL to sidestep EL factory caching originalClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(new URLClassLoader(new URL[] {}, originalClassLoader)); - + try { Class<?> elFactoryClass; if (elFactory == null) { @@ -104,7 +101,8 @@ public class DefaultMessageInterpolatorTest { elFactoryClass = Class.forName(elFactory); System.setProperty(ExpressionFactory.class.getName(), elFactory); } - elAvailable = ExpressionFactory.class.isAssignableFrom(elFactoryClass); + assertTrue(elFactoryClass.isInstance(ExpressionFactory.newInstance())); + elAvailable = true; } catch (Exception e) { elAvailable = false; } diff --git a/bval-perf/pom.xml b/bval-perf/pom.xml index 816ba77..d6b5d41 100644 --- a/bval-perf/pom.xml +++ b/bval-perf/pom.xml @@ -53,7 +53,7 @@ <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-el-api</artifactId> - <scope>test</scope> + <scope>test</scope> </dependency> <dependency> <groupId>org.apache.tomcat</groupId>