You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/02/22 19:26:35 UTC

[tomcat] branch main updated (d0f2c0bea8 -> b272a27ba7)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


    from d0f2c0bea8 Add support for txt: and rnd: map types
     new 7d81989dba Clean-up. Reformatting. No functional change.
     new e69445213b Clean-up. Reformatting. No functional change.
     new 0d4b396392 A sub-set of JavaBeans support that does not depend on java.beans
     new 8588fa9c34 Refactor to make testing BeanSupport implementations easier
     new 068052a9bf Use base class so all BeanSupport implementations are tested
     new b272a27ba7 Clean-up. Formatting. No functional change.

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/jakarta/el/ArrayELResolver.java               |  26 +--
 java/jakarta/el/BeanELResolver.java                | 116 +++------
 java/jakarta/el/BeanNameELResolver.java            |   9 +-
 java/jakarta/el/BeanNameResolver.java              |  18 +-
 java/jakarta/el/BeanSupport.java                   |  69 ++++++
 java/jakarta/el/BeanSupportFull.java               |  99 ++++++++
 java/jakarta/el/BeanSupportStandalone.java         | 217 +++++++++++++++++
 java/jakarta/el/CompositeELResolver.java           |   3 +-
 java/jakarta/el/ELContext.java                     |  39 ++--
 java/jakarta/el/ELContextListener.java             |   1 -
 java/jakarta/el/ELException.java                   |  15 +-
 java/jakarta/el/ELManager.java                     |   8 +-
 java/jakarta/el/ELProcessor.java                   |  92 +++-----
 java/jakarta/el/ELResolver.java                    | 120 ++++------
 java/jakarta/el/EvaluationListener.java            |   3 +-
 java/jakarta/el/ExpressionFactory.java             |  69 +++---
 java/jakarta/el/ImportHandler.java                 |  68 +++---
 java/jakarta/el/LambdaExpression.java              |  17 +-
 java/jakarta/el/ListELResolver.java                |  22 +-
 java/jakarta/el/MapELResolver.java                 |  16 +-
 java/jakarta/el/MethodExpression.java              |  48 ++--
 java/jakarta/el/MethodReference.java               |  25 +-
 java/jakarta/el/ResourceBundleELResolver.java      |  13 +-
 java/jakarta/el/StandardELContext.java             |  30 +--
 java/jakarta/el/StaticFieldELResolver.java         |  44 ++--
 java/jakarta/el/TypeConverter.java                 |   3 +-
 java/jakarta/el/Util.java                          | 114 ++++-----
 java/jakarta/el/ValueExpression.java               |  61 ++---
 .../el/ELBaseTest.java}                            |  50 ++--
 test/jakarta/el/TestArrayELResolver.java           | 147 +++++-------
 test/jakarta/el/TestBeanELResolver.java            | 195 +++++++---------
 .../el/TestBeanELResolverVarargsInvocation.java    |  16 +-
 test/jakarta/el/TestBeanNameELResolver.java        | 114 ++++-----
 test/jakarta/el/TestBeanSupport.java               | 244 +++++++++++++++++++
 test/jakarta/el/TestCompositeELResolver.java       |   3 +-
 test/jakarta/el/TestELContext.java                 |  24 +-
 test/jakarta/el/TestELProcessor.java               |  17 +-
 test/jakarta/el/TestELResolver.java                |  32 +--
 test/jakarta/el/TestEvaluationListener.java        |   8 +-
 test/jakarta/el/TestImportHandler.java             |  17 +-
 .../el/TestImportHandlerStandardPackages.java      |  37 ++-
 test/jakarta/el/TestListELResolver.java            | 112 ++++-----
 test/jakarta/el/TestMapELResolver.java             |  96 ++++----
 test/jakarta/el/TestResourceBundleELResolver.java  |  93 +++-----
 test/jakarta/el/TestStaticFieldELResolver.java     | 182 ++++++---------
 test/jakarta/el/TesterBean.java                    |   2 +-
 test/jakarta/el/TesterBeanNameResolver.java        |   5 +-
 test/jakarta/el/TesterEvaluationListener.java      |   3 +-
 .../jakarta/el/TesterImportHandlerPerformance.java |  14 +-
 test/org/apache/el/TestELEvaluation.java           |  40 ++--
 test/org/apache/el/TestELInJsp.java                |  58 ++---
 test/org/apache/el/TestMethodExpressionImpl.java   | 258 +++++++++------------
 test/org/apache/el/TestValueExpressionImpl.java    |  71 ++----
 test/org/apache/el/TesterBeanB.java                |   2 +-
 test/org/apache/el/TesterBeanC.java                |   6 +-
 test/org/apache/el/TesterBeanF.java                |   8 +-
 test/org/apache/el/TesterBeanG.java                |   7 +-
 test/org/apache/el/TesterBeanH.java                |   5 +-
 test/org/apache/el/TesterEnum.java                 |   3 +-
 test/org/apache/el/TesterFunctions.java            |   1 +
 test/org/apache/el/parser/TestAstAssign.java       |   3 +-
 test/org/apache/el/parser/TestELParser.java        |   3 +-
 .../apache/el/stream/TestCollectionOperations.java |   3 +-
 webapps/docs/changelog.xml                         |  11 +
 64 files changed, 1690 insertions(+), 1565 deletions(-)
 create mode 100644 java/jakarta/el/BeanSupport.java
 create mode 100644 java/jakarta/el/BeanSupportFull.java
 create mode 100644 java/jakarta/el/BeanSupportStandalone.java
 copy test/{org/apache/jasper/compiler/TestJspUtilMakeJavaPackage.java => jakarta/el/ELBaseTest.java} (50%)
 create mode 100644 test/jakarta/el/TestBeanSupport.java


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 06/06: Clean-up. Formatting. No functional change.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit b272a27ba756a8a22657d232029993ef92633859
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 22 18:13:22 2023 +0000

    Clean-up. Formatting. No functional change.
---
 test/org/apache/el/TestELEvaluation.java         |  40 ++--
 test/org/apache/el/TestELInJsp.java              |  58 ++----
 test/org/apache/el/TestMethodExpressionImpl.java | 255 ++++++++++-------------
 test/org/apache/el/TestValueExpressionImpl.java  |  68 ++----
 test/org/apache/el/TesterBeanB.java              |   2 +-
 test/org/apache/el/TesterBeanC.java              |   6 +-
 test/org/apache/el/TesterBeanF.java              |   8 +-
 test/org/apache/el/TesterBeanG.java              |   7 +-
 test/org/apache/el/TesterBeanH.java              |   5 +-
 test/org/apache/el/TesterEnum.java               |   3 +-
 test/org/apache/el/TesterFunctions.java          |   1 +
 11 files changed, 185 insertions(+), 268 deletions(-)

diff --git a/test/org/apache/el/TestELEvaluation.java b/test/org/apache/el/TestELEvaluation.java
index eb036238f0..71f08cb818 100644
--- a/test/org/apache/el/TestELEvaluation.java
+++ b/test/org/apache/el/TestELEvaluation.java
@@ -29,15 +29,13 @@ import org.apache.el.lang.ELSupport;
 import org.apache.jasper.el.ELContextImpl;
 
 /**
- * Tests the EL engine directly. Similar tests may be found in
- * {@link org.apache.jasper.compiler.TestAttributeParser} and
- * {@link TestELInJsp}.
+ * Tests the EL engine directly. Similar tests may be found in {@link org.apache.jasper.compiler.TestAttributeParser}
+ * and {@link TestELInJsp}.
  */
 public class TestELEvaluation {
 
     /**
-     * Test use of spaces in ternary expressions. This was primarily an EL
-     * parser bug.
+     * Test use of spaces in ternary expressions. This was primarily an EL parser bug.
      */
     @Test
     public void testBug42565() {
@@ -65,12 +63,9 @@ public class TestELEvaluation {
      */
     @Test
     public void testBug44994() {
-        Assert.assertEquals("none", evaluateExpression(
-                "${0 lt 0 ? 1 lt 0 ? 'many': 'one': 'none'}"));
-        Assert.assertEquals("one", evaluateExpression(
-                "${0 lt 1 ? 1 lt 1 ? 'many': 'one': 'none'}"));
-        Assert.assertEquals("many", evaluateExpression(
-                "${0 lt 2 ? 1 lt 2 ? 'many': 'one': 'none'}"));
+        Assert.assertEquals("none", evaluateExpression("${0 lt 0 ? 1 lt 0 ? 'many': 'one': 'none'}"));
+        Assert.assertEquals("one", evaluateExpression("${0 lt 1 ? 1 lt 1 ? 'many': 'one': 'none'}"));
+        Assert.assertEquals("many", evaluateExpression("${0 lt 2 ? 1 lt 2 ? 'many': 'one': 'none'}"));
     }
 
     @Test
@@ -97,8 +92,8 @@ public class TestELEvaluation {
         Assert.assertEquals("\\\\", evaluateExpression("\\\\"));
 
         /*
-         * LiteralExpressions can only contain ${ or #{ if escaped with \
-         * \ is not an escape character in any other circumstances including \\
+         * LiteralExpressions can only contain ${ or #{ if escaped with \ \ is not an escape character in any other
+         * circumstances including \\
          */
         Assert.assertEquals("\\", evaluateExpression("\\"));
         Assert.assertEquals("$", evaluateExpression("$"));
@@ -162,22 +157,22 @@ public class TestELEvaluation {
         Assert.assertEquals("''", evaluateExpression("${\"\'\'\"}"));
     }
 
-    private void compareBoth(String msg, int expected, Object o1, Object o2){
+    private void compareBoth(String msg, int expected, Object o1, Object o2) {
         int i1 = ELSupport.compare(null, o1, o2);
         int i2 = ELSupport.compare(null, o2, o1);
-        Assert.assertEquals(msg,expected, i1);
-        Assert.assertEquals(msg,expected, -i2);
+        Assert.assertEquals(msg, expected, i1);
+        Assert.assertEquals(msg, expected, -i2);
     }
 
     @Test
-    public void testElSupportCompare(){
+    public void testElSupportCompare() {
         compareBoth("Nulls should compare equal", 0, null, null);
         compareBoth("Null should compare equal to \"\"", 0, "", null);
-        compareBoth("Null should be less than File()",-1, null, new File(""));
-        compareBoth("Null should be less than Date()",-1, null, new Date());
-        compareBoth("Date(0) should be less than Date(1)",-1, new Date(0), new Date(1));
+        compareBoth("Null should be less than File()", -1, null, new File(""));
+        compareBoth("Null should be less than Date()", -1, null, new Date());
+        compareBoth("Date(0) should be less than Date(1)", -1, new Date(0), new Date(1));
         try {
-            compareBoth("Should not compare",0, new Date(), new File(""));
+            compareBoth("Should not compare", 0, new Date(), new File(""));
             Assert.fail("Expecting ClassCastException");
         } catch (ClassCastException expected) {
             // Expected
@@ -256,8 +251,7 @@ public class TestELEvaluation {
         ExpressionFactoryImpl exprFactory = new ExpressionFactoryImpl();
         ELContextImpl ctx = new ELContextImpl();
         ctx.setFunctionMapper(new TesterFunctions.FMapper());
-        ValueExpression ve = exprFactory.createValueExpression(ctx, expression,
-                String.class);
+        ValueExpression ve = exprFactory.createValueExpression(ctx, expression, String.class);
         return (String) ve.getValue(ctx);
     }
 }
diff --git a/test/org/apache/el/TestELInJsp.java b/test/org/apache/el/TestELInJsp.java
index 236660e29b..4c8bfb0661 100644
--- a/test/org/apache/el/TestELInJsp.java
+++ b/test/org/apache/el/TestELInJsp.java
@@ -33,9 +33,8 @@ import org.apache.jasper.servlet.JasperInitializer;
 import org.apache.tomcat.util.buf.ByteChunk;
 
 /**
- * Tests EL with an without JSP attributes using a test web application. Similar
- * tests may be found in {@link TestELEvaluation} and
- * {@link org.apache.jasper.compiler.TestAttributeParser}.
+ * Tests EL with an without JSP attributes using a test web application. Similar tests may be found in
+ * {@link TestELEvaluation} and {@link org.apache.jasper.compiler.TestAttributeParser}.
  */
 public class TestELInJsp extends TomcatBaseTest {
 
@@ -90,8 +89,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug45427() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug45nnn/bug45427.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug45nnn/bug45427.jsp");
 
         String result = res.toString();
         // Warning: JSP attribute escaping != Java String escaping
@@ -117,8 +115,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug45451() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug45nnn/bug45451a.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug45nnn/bug45451a.jsp");
 
         String result = res.toString();
         // Warning: JSP attribute escaping != Java String escaping
@@ -131,7 +128,7 @@ public class TestELInJsp extends TomcatBaseTest {
         result = res.toString();
         // Warning: JSP attribute escaping != Java String escaping
         // Warning: Attributes are always unescaped before passing to the EL
-        //          processor
+        // processor
         assertEcho(result, "00-2");
         assertEcho(result, "01-${1+1}");
         assertEcho(result, "02-\\${1+1}");
@@ -160,7 +157,7 @@ public class TestELInJsp extends TomcatBaseTest {
         result = res.toString();
         // Warning: JSP attribute escaping != Java String escaping
         // TODO - Currently we allow a single unescaped \ in attribute values
-        //        Review if this should cause a warning/error
+        // Review if this should cause a warning/error
         assertEcho(result, "00-${1+1}");
         assertEcho(result, "01-\\${1+1}");
         assertEcho(result, "02-\\\\${1+1}");
@@ -203,7 +200,7 @@ public class TestELInJsp extends TomcatBaseTest {
         result = res.toString();
         // Warning: JSP attribute escaping != Java String escaping
         // Warning: Attributes are always unescaped before passing to the EL
-        //          processor
+        // processor
         assertEcho(result, "00-2");
         assertEcho(result, "01-${1+1}");
         assertEcho(result, "02-\\${1+1}");
@@ -226,8 +223,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug45511() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug45nnn/bug45511.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug45nnn/bug45511.jsp");
 
         String result = res.toString();
         assertEcho(result, "00-true");
@@ -268,8 +264,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug48112() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug48nnn/bug48112.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug48nnn/bug48112.jsp");
         String result = res.toString();
         assertEcho(result, "{OK}");
     }
@@ -288,8 +283,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug51544() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug51544.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug51544.jsp");
 
         String result = res.toString();
         assertEcho(result, "Empty list: true");
@@ -311,8 +305,7 @@ public class TestELInJsp extends TomcatBaseTest {
         // Create the context (don't use addWebapp as we want to modify the
         // JSP Servlet settings).
         File appDir = new File("test/webapp");
-        StandardContext ctxt = (StandardContext) tomcat.addContext(
-                null, "/test", appDir.getAbsolutePath());
+        StandardContext ctxt = (StandardContext) tomcat.addContext(null, "/test", appDir.getAbsolutePath());
 
         ctxt.addServletContainerInitializer(new JasperInitializer(), null);
 
@@ -399,8 +392,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug56029() throws Exception {
         getTomcatInstanceTestWebapp(true, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug56029.jspx");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug56029.jspx");
 
         String result = res.toString();
 
@@ -412,8 +404,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug56147() throws Exception {
         getTomcatInstanceTestWebapp(true, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug56147.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug56147.jsp");
 
         String result = res.toString();
         assertEcho(result, "00-OK");
@@ -424,8 +415,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug56612() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug56612.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug56612.jsp");
 
         String result = res.toString();
         Assert.assertTrue(result.contains("00-''"));
@@ -439,8 +429,7 @@ public class TestELInJsp extends TomcatBaseTest {
     public void testBug57141() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug57141.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug57141.jsp");
 
         String result = res.toString();
         assertEcho(result, "00-true");
@@ -450,16 +439,14 @@ public class TestELInJsp extends TomcatBaseTest {
 
 
     /*
-     * BZ https://bz.apache.org/bugzilla/show_bug.cgi?id=57142
-     * jakarta.servlet, jakarta.servlet.http and jakarta.servlet.jsp should be
-     * imported by default.
+     * BZ https://bz.apache.org/bugzilla/show_bug.cgi?id=57142 jakarta.servlet, jakarta.servlet.http and
+     * jakarta.servlet.jsp should be imported by default.
      */
     @Test
     public void testBug57142() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug57142.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug57142.jsp");
 
         String result = res.toString();
         // jakarta.servlet
@@ -475,15 +462,14 @@ public class TestELInJsp extends TomcatBaseTest {
 
 
     /*
-     * BZ https://bz.apache.org/bugzilla/show_bug.cgi?id=57441
-     * Can't validate function names defined in lambdas (or via imports)
+     * BZ https://bz.apache.org/bugzilla/show_bug.cgi?id=57441 Can't validate function names defined in lambdas (or via
+     * imports)
      */
     @Test
     public void testBug57441() throws Exception {
         getTomcatInstanceTestWebapp(false, true);
 
-        ByteChunk res = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug57441.jsp");
+        ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug57441.jsp");
 
         String result = res.toString();
         assertEcho(result, "00-11");
@@ -514,7 +500,7 @@ public class TestELInJsp extends TomcatBaseTest {
 
     @Test
     public void testBug61854a() throws Exception {
-        getTomcatInstanceTestWebapp(true,  true);
+        getTomcatInstanceTestWebapp(true, true);
 
         ByteChunk res = getUrl("http://localhost:" + getPort() + "/test/bug6nnnn/bug61854.jsp");
         String result = res.toString();
diff --git a/test/org/apache/el/TestMethodExpressionImpl.java b/test/org/apache/el/TestMethodExpressionImpl.java
index 0789c94984..9609e517ce 100644
--- a/test/org/apache/el/TestMethodExpressionImpl.java
+++ b/test/org/apache/el/TestMethodExpressionImpl.java
@@ -48,37 +48,30 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
         TesterBeanA beanA = new TesterBeanA();
         beanA.setName("A");
-        context.getVariableMapper().setVariable("beanA",
-                factory.createValueExpression(beanA, TesterBeanA.class));
+        context.getVariableMapper().setVariable("beanA", factory.createValueExpression(beanA, TesterBeanA.class));
 
         TesterBeanAA beanAA = new TesterBeanAA();
         beanAA.setName("AA");
-        context.getVariableMapper().setVariable("beanAA",
-                factory.createValueExpression(beanAA, TesterBeanAA.class));
+        context.getVariableMapper().setVariable("beanAA", factory.createValueExpression(beanAA, TesterBeanAA.class));
 
         TesterBeanAAA beanAAA = new TesterBeanAAA();
         beanAAA.setName("AAA");
-        context.getVariableMapper().setVariable("beanAAA",
-                factory.createValueExpression(beanAAA, TesterBeanAAA.class));
+        context.getVariableMapper().setVariable("beanAAA", factory.createValueExpression(beanAAA, TesterBeanAAA.class));
 
         beanB = new TesterBeanB();
         beanB.setName("B");
-        context.getVariableMapper().setVariable("beanB",
-                factory.createValueExpression(beanB, TesterBeanB.class));
+        context.getVariableMapper().setVariable("beanB", factory.createValueExpression(beanB, TesterBeanB.class));
 
         TesterBeanBB beanBB = new TesterBeanBB();
         beanBB.setName("BB");
-        context.getVariableMapper().setVariable("beanBB",
-                factory.createValueExpression(beanBB, TesterBeanBB.class));
+        context.getVariableMapper().setVariable("beanBB", factory.createValueExpression(beanBB, TesterBeanBB.class));
 
         TesterBeanBBB beanBBB = new TesterBeanBBB();
         beanBBB.setName("BBB");
-        context.getVariableMapper().setVariable("beanBBB",
-                factory.createValueExpression(beanBBB, TesterBeanBBB.class));
+        context.getVariableMapper().setVariable("beanBBB", factory.createValueExpression(beanBBB, TesterBeanBBB.class));
 
         TesterBeanC beanC = new TesterBeanC();
-        context.getVariableMapper().setVariable("beanC",
-                factory.createValueExpression(beanC, TesterBeanC.class));
+        context.getVariableMapper().setVariable("beanC", factory.createValueExpression(beanC, TesterBeanC.class));
 
         TesterBeanEnum beanEnum = new TesterBeanEnum();
         context.getVariableMapper().setVariable("beanEnum",
@@ -87,10 +80,9 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testIsParametersProvided() {
-        MethodExpression me1 = factory.createMethodExpression(
-                context, "${beanB.getName}", String.class, new Class<?>[] {});
-        MethodExpression me2 = factory.createMethodExpression(
-                context, "${beanB.sayHello('JUnit')}", String.class,
+        MethodExpression me1 = factory.createMethodExpression(context, "${beanB.getName}", String.class,
+                new Class<?>[] {});
+        MethodExpression me2 = factory.createMethodExpression(context, "${beanB.sayHello('JUnit')}", String.class,
                 new Class<?>[] { String.class });
 
         Assert.assertFalse(me1.isParametersProvided());
@@ -99,101 +91,86 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testInvoke() {
-        MethodExpression me1 = factory.createMethodExpression(
-                context, "${beanB.getName}", String.class, new Class<?>[] {});
-        MethodExpression me2 = factory.createMethodExpression(
-                context, "${beanB.sayHello('JUnit')}", String.class,
+        MethodExpression me1 = factory.createMethodExpression(context, "${beanB.getName}", String.class,
+                new Class<?>[] {});
+        MethodExpression me2 = factory.createMethodExpression(context, "${beanB.sayHello('JUnit')}", String.class,
                 new Class<?>[] { String.class });
-        MethodExpression me3 = factory.createMethodExpression(
-                context, "${beanB.sayHello}", String.class,
+        MethodExpression me3 = factory.createMethodExpression(context, "${beanB.sayHello}", String.class,
                 new Class<?>[] { String.class });
 
         Assert.assertEquals("B", me1.invoke(context, null));
         Assert.assertEquals("Hello JUnit from B", me2.invoke(context, null));
-        Assert.assertEquals("Hello JUnit from B",
-                me2.invoke(context, new Object[] { "JUnit2" }));
-        Assert.assertEquals("Hello JUnit2 from B",
-                me3.invoke(context, new Object[] { "JUnit2" }));
-        Assert.assertEquals("Hello JUnit from B",
-                me2.invoke(context, new Object[] { null }));
-        Assert.assertEquals("Hello  from B",
-                me3.invoke(context, new Object[] { null }));
+        Assert.assertEquals("Hello JUnit from B", me2.invoke(context, new Object[] { "JUnit2" }));
+        Assert.assertEquals("Hello JUnit2 from B", me3.invoke(context, new Object[] { "JUnit2" }));
+        Assert.assertEquals("Hello JUnit from B", me2.invoke(context, new Object[] { null }));
+        Assert.assertEquals("Hello  from B", me3.invoke(context, new Object[] { null }));
     }
 
     @Test
     public void testInvokeWithSuper() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanA.setBean(beanBB)}", null ,
+        MethodExpression me = factory.createMethodExpression(context, "${beanA.setBean(beanBB)}", null,
                 new Class<?>[] { TesterBeanB.class });
         me.invoke(context, null);
-        ValueExpression ve = factory.createValueExpression(context,
-                "${beanA.bean.name}", String.class);
+        ValueExpression ve = factory.createValueExpression(context, "${beanA.bean.name}", String.class);
         Object r = ve.getValue(context);
         Assert.assertEquals("BB", r);
     }
 
     @Test
     public void testInvokeWithSuperABNoReturnTypeNoParamTypes() {
-        MethodExpression me2 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanB)}", null , null);
+        MethodExpression me2 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB)}", null, null);
         Object r2 = me2.invoke(context, null);
         Assert.assertEquals("AB: Hello A from B", r2.toString());
     }
 
     @Test
     public void testInvokeWithSuperABReturnTypeNoParamTypes() {
-        MethodExpression me3 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanB)}", String.class , null);
+        MethodExpression me3 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB)}", String.class,
+                null);
         Object r3 = me3.invoke(context, null);
         Assert.assertEquals("AB: Hello A from B", r3.toString());
     }
 
     @Test
     public void testInvokeWithSuperABNoReturnTypeParamTypes() {
-        MethodExpression me4 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanB)}", null ,
-                new Class<?>[] {TesterBeanA.class, TesterBeanB.class});
+        MethodExpression me4 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB)}", null,
+                new Class<?>[] { TesterBeanA.class, TesterBeanB.class });
         Object r4 = me4.invoke(context, null);
         Assert.assertEquals("AB: Hello A from B", r4.toString());
     }
 
     @Test
     public void testInvokeWithSuperABReturnTypeParamTypes() {
-        MethodExpression me5 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanB)}", String.class ,
-                new Class<?>[] {TesterBeanA.class, TesterBeanB.class});
+        MethodExpression me5 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB)}", String.class,
+                new Class<?>[] { TesterBeanA.class, TesterBeanB.class });
         Object r5 = me5.invoke(context, null);
         Assert.assertEquals("AB: Hello A from B", r5.toString());
     }
 
     @Test
     public void testInvokeWithSuperABB() {
-        MethodExpression me6 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanBB)}", null , null);
+        MethodExpression me6 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanBB)}", null, null);
         Object r6 = me6.invoke(context, null);
         Assert.assertEquals("ABB: Hello A from BB", r6.toString());
     }
 
     @Test
     public void testInvokeWithSuperABBB() {
-        MethodExpression me7 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanBBB)}", null , null);
+        MethodExpression me7 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanBBB)}", null, null);
         Object r7 = me7.invoke(context, null);
         Assert.assertEquals("ABB: Hello A from BBB", r7.toString());
     }
 
     @Test
     public void testInvokeWithSuperAAB() {
-        MethodExpression me8 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAA,beanB)}", null , null);
+        MethodExpression me8 = factory.createMethodExpression(context, "${beanC.sayHello(beanAA,beanB)}", null, null);
         Object r8 = me8.invoke(context, null);
         Assert.assertEquals("AAB: Hello AA from B", r8.toString());
     }
 
     @Test
     public void testInvokeWithSuperAABB() {
-        MethodExpression me9 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAA,beanBB)}", null , null);
+        MethodExpression me9 = factory.createMethodExpression(context, "${beanC.sayHello(beanAA,beanBB)}", null, null);
         Exception e = null;
         try {
             me9.invoke(context, null);
@@ -209,16 +186,15 @@ public class TestMethodExpressionImpl extends ELBaseTest {
         // The Java compiler reports this as ambiguous. Using the parameter that
         // matches exactly seems reasonable to limit the scope of the method
         // search so the EL will find a match.
-        MethodExpression me10 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAA,beanBBB)}", null , null);
+        MethodExpression me10 = factory.createMethodExpression(context, "${beanC.sayHello(beanAA,beanBBB)}", null,
+                null);
         Object r10 = me10.invoke(context, null);
         Assert.assertEquals("AAB: Hello AA from BBB", r10.toString());
     }
 
     @Test
     public void testInvokeWithSuperAAAB() {
-        MethodExpression me11 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAAA,beanB)}", null , null);
+        MethodExpression me11 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanB)}", null, null);
         Object r11 = me11.invoke(context, null);
         Assert.assertEquals("AAB: Hello AAA from B", r11.toString());
     }
@@ -228,16 +204,16 @@ public class TestMethodExpressionImpl extends ELBaseTest {
         // The Java compiler reports this as ambiguous. Using the parameter that
         // matches exactly seems reasonable to limit the scope of the method
         // search so the EL will find a match.
-        MethodExpression me12 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAAA,beanBB)}", null , null);
+        MethodExpression me12 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanBB)}", null,
+                null);
         Object r12 = me12.invoke(context, null);
         Assert.assertEquals("ABB: Hello AAA from BB", r12.toString());
     }
 
     @Test
     public void testInvokeWithSuperAAABBB() {
-        MethodExpression me13 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAAA,beanBBB)}", null , null);
+        MethodExpression me13 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanBBB)}", null,
+                null);
         Exception e = null;
         try {
             me13.invoke(context, null);
@@ -250,8 +226,8 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testInvokeWithVarArgsAB() throws Exception {
-        MethodExpression me1 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanB,beanB)}", null , null);
+        MethodExpression me1 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB,beanB)}", null,
+                null);
         Exception e = null;
         try {
             me1.invoke(context, null);
@@ -264,24 +240,24 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testInvokeWithVarArgsABB() throws Exception {
-        MethodExpression me2 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanBB,beanBB)}", null , null);
+        MethodExpression me2 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanBB,beanBB)}", null,
+                null);
         Object r2 = me2.invoke(context, null);
         Assert.assertEquals("ABB[]: Hello A from BB, BB", r2.toString());
     }
 
     @Test
     public void testInvokeWithVarArgsABBB() throws Exception {
-        MethodExpression me3 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanA,beanBBB,beanBBB)}", null , null);
+        MethodExpression me3 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanBBB,beanBBB)}", null,
+                null);
         Object r3 = me3.invoke(context, null);
         Assert.assertEquals("ABB[]: Hello A from BBB, BBB", r3.toString());
     }
 
     @Test
     public void testInvokeWithVarArgsAAB() throws Exception {
-        MethodExpression me4 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAA,beanB,beanB)}", null , null);
+        MethodExpression me4 = factory.createMethodExpression(context, "${beanC.sayHello(beanAA,beanB,beanB)}", null,
+                null);
         Exception e = null;
         try {
             me4.invoke(context, null);
@@ -294,24 +270,24 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testInvokeWithVarArgsAABB() throws Exception {
-        MethodExpression me5 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAA,beanBB,beanBB)}", null , null);
+        MethodExpression me5 = factory.createMethodExpression(context, "${beanC.sayHello(beanAA,beanBB,beanBB)}", null,
+                null);
         Object r5 = me5.invoke(context, null);
         Assert.assertEquals("ABB[]: Hello AA from BB, BB", r5.toString());
     }
 
     @Test
     public void testInvokeWithVarArgsAABBB() throws Exception {
-        MethodExpression me6 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAA,beanBBB,beanBBB)}", null , null);
+        MethodExpression me6 = factory.createMethodExpression(context, "${beanC.sayHello(beanAA,beanBBB,beanBBB)}",
+                null, null);
         Object r6 = me6.invoke(context, null);
         Assert.assertEquals("ABB[]: Hello AA from BBB, BBB", r6.toString());
     }
 
     @Test
     public void testInvokeWithVarArgsAAAB() throws Exception {
-        MethodExpression me7 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAAA,beanB,beanB)}", null , null);
+        MethodExpression me7 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanB,beanB)}", null,
+                null);
         Exception e = null;
         try {
             me7.invoke(context, null);
@@ -324,100 +300,89 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testInvokeWithVarArgsAAABB() throws Exception {
-        MethodExpression me8 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAAA,beanBB,beanBB)}", null , null);
+        MethodExpression me8 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanBB,beanBB)}", null,
+                null);
         Object r8 = me8.invoke(context, null);
         Assert.assertEquals("ABB[]: Hello AAA from BB, BB", r8.toString());
     }
 
     @Test
     public void testInvokeWithVarArgsAAABBB() throws Exception {
-        MethodExpression me9 = factory.createMethodExpression(context,
-                "${beanC.sayHello(beanAAA,beanBBB,beanBBB)}", null , null);
+        MethodExpression me9 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanBBB,beanBBB)}",
+                null, null);
         Object r9 = me9.invoke(context, null);
         Assert.assertEquals("ABB[]: Hello AAA from BBB, BBB", r9.toString());
     }
 
     /*
-     * This is also tested implicitly in numerous places elsewhere in this
-     * class.
+     * This is also tested implicitly in numerous places elsewhere in this class.
      */
     @Test
     public void testBug49655() throws Exception {
         // This is the call the failed
-        MethodExpression me = factory.createMethodExpression(context,
-                "#{beanA.setName('New value')}", null, null);
+        MethodExpression me = factory.createMethodExpression(context, "#{beanA.setName('New value')}", null, null);
         // The rest is to check it worked correctly
         me.invoke(context, null);
-        ValueExpression ve = factory.createValueExpression(context,
-                "#{beanA.name}", java.lang.String.class);
+        ValueExpression ve = factory.createValueExpression(context, "#{beanA.name}", java.lang.String.class);
         Assert.assertEquals("New value", ve.getValue(context));
     }
 
     @Test
     public void testBugPrimitives() throws Exception {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanA.setValLong(5)}", null, null);
+        MethodExpression me = factory.createMethodExpression(context, "${beanA.setValLong(5)}", null, null);
         me.invoke(context, null);
-        ValueExpression ve = factory.createValueExpression(context,
-                "#{beanA.valLong}", java.lang.String.class);
+        ValueExpression ve = factory.createValueExpression(context, "#{beanA.valLong}", java.lang.String.class);
         Assert.assertEquals("5", ve.getValue(context));
     }
 
     @Test
     public void testBug50449a() throws Exception {
-        MethodExpression me1 = factory.createMethodExpression(context,
-                "${beanB.sayHello()}", null, null);
+        MethodExpression me1 = factory.createMethodExpression(context, "${beanB.sayHello()}", null, null);
         String actual = (String) me1.invoke(context, null);
         Assert.assertEquals("Hello from B", actual);
     }
 
     @Test
     public void testBug50449b() throws Exception {
-        MethodExpression me1 = factory.createMethodExpression(context,
-                "${beanB.sayHello('Tomcat')}", null, null);
+        MethodExpression me1 = factory.createMethodExpression(context, "${beanB.sayHello('Tomcat')}", null, null);
         String actual = (String) me1.invoke(context, null);
         Assert.assertEquals("Hello Tomcat from B", actual);
     }
 
     @Test
     public void testBug50790a() throws Exception {
-        ValueExpression ve = factory.createValueExpression(context,
-                "#{beanAA.name.contains(beanA.name)}", java.lang.Boolean.class);
+        ValueExpression ve = factory.createValueExpression(context, "#{beanAA.name.contains(beanA.name)}",
+                java.lang.Boolean.class);
         Boolean actual = (Boolean) ve.getValue(context);
         Assert.assertEquals(Boolean.TRUE, actual);
     }
 
     @Test
     public void testBug50790b() throws Exception {
-        ValueExpression ve = factory.createValueExpression(context,
-                "#{beanA.name.contains(beanAA.name)}", java.lang.Boolean.class);
+        ValueExpression ve = factory.createValueExpression(context, "#{beanA.name.contains(beanAA.name)}",
+                java.lang.Boolean.class);
         Boolean actual = (Boolean) ve.getValue(context);
         Assert.assertEquals(Boolean.FALSE, actual);
     }
 
     @Test
     public void testBug52445a() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanA.setBean(beanBB)}", null ,
+        MethodExpression me = factory.createMethodExpression(context, "${beanA.setBean(beanBB)}", null,
                 new Class<?>[] { TesterBeanB.class });
         me.invoke(context, null);
 
-        MethodExpression me1 = factory.createMethodExpression(context,
-                "${beanA.bean.sayHello()}", null, null);
+        MethodExpression me1 = factory.createMethodExpression(context, "${beanA.bean.sayHello()}", null, null);
         String actual = (String) me1.invoke(context, null);
         Assert.assertEquals("Hello from BB", actual);
     }
 
     @Test
     public void testBug52970() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanEnum.submit('APPLE')}", null ,
+        MethodExpression me = factory.createMethodExpression(context, "${beanEnum.submit('APPLE')}", null,
                 new Class<?>[] { TesterBeanEnum.class });
         me.invoke(context, null);
 
-        ValueExpression ve = factory.createValueExpression(context,
-                "#{beanEnum.lastSubmitted}", TesterEnum.class);
+        ValueExpression ve = factory.createValueExpression(context, "#{beanEnum.lastSubmitted}", TesterEnum.class);
         TesterEnum actual = (TesterEnum) ve.getValue(context);
         Assert.assertEquals(TesterEnum.APPLE, actual);
 
@@ -425,34 +390,29 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testBug53792a() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanA.setBean(beanB)}", null ,
+        MethodExpression me = factory.createMethodExpression(context, "${beanA.setBean(beanB)}", null,
                 new Class<?>[] { TesterBeanB.class });
         me.invoke(context, null);
-        me = factory.createMethodExpression(context,
-                "${beanB.setName('" + BUG53792 + "')}", null ,
+        me = factory.createMethodExpression(context, "${beanB.setName('" + BUG53792 + "')}", null,
                 new Class<?>[] { TesterBeanB.class });
         me.invoke(context, null);
 
-        ValueExpression ve = factory.createValueExpression(context,
-                "#{beanA.getBean().name}", java.lang.String.class);
+        ValueExpression ve = factory.createValueExpression(context, "#{beanA.getBean().name}", java.lang.String.class);
         String actual = (String) ve.getValue(context);
         Assert.assertEquals(BUG53792, actual);
     }
 
     @Test
     public void testBug53792b() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanA.setBean(beanB)}", null ,
+        MethodExpression me = factory.createMethodExpression(context, "${beanA.setBean(beanB)}", null,
                 new Class<?>[] { TesterBeanB.class });
         me.invoke(context, null);
-        me = factory.createMethodExpression(context,
-                "${beanB.setName('" + BUG53792 + "')}", null ,
+        me = factory.createMethodExpression(context, "${beanB.setName('" + BUG53792 + "')}", null,
                 new Class<?>[] { TesterBeanB.class });
         me.invoke(context, null);
 
-        ValueExpression ve = factory.createValueExpression(context,
-                "#{beanA.getBean().name.length()}", java.lang.Integer.class);
+        ValueExpression ve = factory.createValueExpression(context, "#{beanA.getBean().name.length()}",
+                java.lang.Integer.class);
         Integer actual = (Integer) ve.getValue(context);
         Assert.assertEquals(Integer.valueOf(BUG53792.length()), actual);
     }
@@ -460,8 +420,8 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testBug53792c() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "#{beanB.sayHello().length()}", null, new Class<?>[] {});
+        MethodExpression me = factory.createMethodExpression(context, "#{beanB.sayHello().length()}", null,
+                new Class<?>[] {});
         Integer result = (Integer) me.invoke(context, null);
         Assert.assertEquals(beanB.sayHello().length(), result.intValue());
     }
@@ -469,8 +429,8 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testBug53792d() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "#{beanB.sayHello().length()}", null, new Class<?>[] {});
+        MethodExpression me = factory.createMethodExpression(context, "#{beanB.sayHello().length()}", null,
+                new Class<?>[] {});
         Integer result = (Integer) me.invoke(context, new Object[] { "foo" });
         Assert.assertEquals(beanB.sayHello().length(), result.intValue());
     }
@@ -478,8 +438,7 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testBug56797a() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanAA.echo1('Hello World!')}", null , null);
+        MethodExpression me = factory.createMethodExpression(context, "${beanAA.echo1('Hello World!')}", null, null);
         Object r = me.invoke(context, null);
         Assert.assertEquals("AA1Hello World!", r.toString());
     }
@@ -487,57 +446,56 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testBug56797b() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanAA.echo2('Hello World!')}", null , null);
+        MethodExpression me = factory.createMethodExpression(context, "${beanAA.echo2('Hello World!')}", null, null);
         Object r = me.invoke(context, null);
         Assert.assertEquals("AA2Hello World!", r.toString());
     }
 
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testBug57855a() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanAA.echo2}", null , new Class[]{String.class});
+        MethodExpression me = factory.createMethodExpression(context, "${beanAA.echo2}", null,
+                new Class[] { String.class });
         me.invoke(context, new Object[0]);
     }
 
 
-    @Test(expected=IllegalArgumentException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void testBug57855b() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanAA.echo2}", null , new Class[]{String.class});
+        MethodExpression me = factory.createMethodExpression(context, "${beanAA.echo2}", null,
+                new Class[] { String.class });
         me.invoke(context, null);
     }
 
     @Test
     public void testBug57855c() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanB.echo}", null , new Class[]{String.class});
+        MethodExpression me = factory.createMethodExpression(context, "${beanB.echo}", null,
+                new Class[] { String.class });
         me.invoke(context, null);
     }
 
 
     @Test
     public void testBug57855d() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanB.echo}", null , new Class[]{String.class});
+        MethodExpression me = factory.createMethodExpression(context, "${beanB.echo}", null,
+                new Class[] { String.class });
         Object r = me.invoke(context, new String[] { "aaa" });
         Assert.assertEquals("aaa", r.toString());
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testBug57855e() {
-        MethodExpression me = factory.createMethodExpression(context,
-                "${beanB.echo}", null , new Class[]{String.class});
+        MethodExpression me = factory.createMethodExpression(context, "${beanB.echo}", null,
+                new Class[] { String.class });
         Object r = me.invoke(context, new String[] { "aaa", "bbb" });
         Assert.assertEquals("aaa, bbb", r.toString());
     }
 
 
-    @Test(expected=IllegalArgumentException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void testBug60844() {
-        MethodExpression me2 = factory.createMethodExpression(context,
-                "${beanC.sayHello}", null , new Class[]{ TesterBeanA.class, TesterBeanB.class});
+        MethodExpression me2 = factory.createMethodExpression(context, "${beanC.sayHello}", null,
+                new Class[] { TesterBeanA.class, TesterBeanB.class });
         me2.invoke(context, new Object[] { new Object() });
     }
 
@@ -604,7 +562,7 @@ public class TestMethodExpressionImpl extends ELBaseTest {
     }
 
 
-    private void doTestVarArgsBeanF(String expression, Function<TesterBeanF,String> func) {
+    private void doTestVarArgsBeanF(String expression, Function<TesterBeanF, String> func) {
         ELProcessor elp = new ELProcessor();
         elp.defineBean("apple", TesterEnum.APPLE);
         elp.defineBean("beanF", new TesterBeanF());
@@ -674,7 +632,7 @@ public class TestMethodExpressionImpl extends ELBaseTest {
     }
 
 
-    private void doTestVarArgsBeanG(String expression, Function<TesterBeanG,String> func) {
+    private void doTestVarArgsBeanG(String expression, Function<TesterBeanG, String> func) {
         ELProcessor elp = new ELProcessor();
         elp.defineBean("apple", TesterEnum.APPLE);
         elp.defineBean("beanG", new TesterBeanG());
@@ -743,7 +701,7 @@ public class TestMethodExpressionImpl extends ELBaseTest {
     }
 
 
-    private void doTestVarArgsBeanH(String expression, Function<TesterBeanH,String> func) {
+    private void doTestVarArgsBeanH(String expression, Function<TesterBeanH, String> func) {
         ELProcessor elp = new ELProcessor();
         elp.defineBean("apple", TesterEnum.APPLE);
         elp.defineBean("beanH", new TesterBeanH());
@@ -767,8 +725,7 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testGetMethodInfo01() throws Exception {
-        MethodExpression me = factory.createMethodExpression(context,
-                "#{beanA.setName('New value')}", null, null);
+        MethodExpression me = factory.createMethodExpression(context, "#{beanA.setName('New value')}", null, null);
         // This is the call that failed
         MethodInfo mi = me.getMethodInfo(context);
         // The rest is to check it worked correctly
@@ -780,8 +737,8 @@ public class TestMethodExpressionImpl extends ELBaseTest {
 
     @Test
     public void testGetMethodInfo02() throws Exception {
-        MethodExpression me = factory.createMethodExpression(context,
-                "#{beanA.setName}", null, new Class[] { String.class } );
+        MethodExpression me = factory.createMethodExpression(context, "#{beanA.setName}", null,
+                new Class[] { String.class });
         // This is the call that failed
         MethodInfo mi = me.getMethodInfo(context);
         // The rest is to check it worked correctly
diff --git a/test/org/apache/el/TestValueExpressionImpl.java b/test/org/apache/el/TestValueExpressionImpl.java
index ba5bb6dd8e..f238a89c5c 100644
--- a/test/org/apache/el/TestValueExpressionImpl.java
+++ b/test/org/apache/el/TestValueExpressionImpl.java
@@ -42,12 +42,10 @@ public class TestValueExpressionImpl extends ELBaseTest {
 
         TesterBeanB beanB = new TesterBeanB();
         beanB.setName("Tomcat");
-        ValueExpression var =
-            factory.createValueExpression(beanB, TesterBeanB.class);
+        ValueExpression var = factory.createValueExpression(beanB, TesterBeanB.class);
         context.getVariableMapper().setVariable("beanB", var);
 
-        ValueExpression ve = factory.createValueExpression(
-                context, "${beanB.name}", String.class);
+        ValueExpression ve = factory.createValueExpression(context, "${beanB.name}", String.class);
 
         // First check the basics work
         String result = (String) ve.getValue(context);
@@ -68,17 +66,14 @@ public class TestValueExpressionImpl extends ELBaseTest {
 
         TesterBeanB beanB = new TesterBeanB();
         beanB.setName("Tomcat");
-        ValueExpression var =
-            factory.createValueExpression(beanB, TesterBeanB.class);
+        ValueExpression var = factory.createValueExpression(beanB, TesterBeanB.class);
         context.getVariableMapper().setVariable("beanB", var);
 
-        ValueExpression var2 = factory.createValueExpression(
-                context, "${beanB.name}", String.class);
+        ValueExpression var2 = factory.createValueExpression(context, "${beanB.name}", String.class);
 
         context.getVariableMapper().setVariable("foo", var2);
 
-        ValueExpression ve = factory.createValueExpression(
-                context, "${foo}", ValueExpression.class);
+        ValueExpression ve = factory.createValueExpression(context, "${foo}", ValueExpression.class);
 
 
         // Now check the value reference
@@ -99,12 +94,10 @@ public class TestValueExpressionImpl extends ELBaseTest {
         beanB.setName("Tomcat");
         beanA.setBean(beanB);
 
-        ValueExpression var =
-            factory.createValueExpression(beanA, TesterBeanA.class);
+        ValueExpression var = factory.createValueExpression(beanA, TesterBeanA.class);
         context.getVariableMapper().setVariable("beanA", var);
 
-        ValueExpression ve = factory.createValueExpression(
-                context, "${beanA.bean.name}", String.class);
+        ValueExpression ve = factory.createValueExpression(context, "${beanA.bean.name}", String.class);
 
         // First check the basics work
         String result = (String) ve.getValue(context);
@@ -125,18 +118,15 @@ public class TestValueExpressionImpl extends ELBaseTest {
 
         TesterEnum testEnum = TesterEnum.APPLE;
 
-        ValueExpression var =
-            factory.createValueExpression(testEnum, TesterEnum.class);
+        ValueExpression var = factory.createValueExpression(testEnum, TesterEnum.class);
         context.getVariableMapper().setVariable("testEnum", var);
 
         // When coercing an Enum to a String, name() should always be used.
-        ValueExpression ve1 = factory.createValueExpression(
-                context, "${testEnum}", String.class);
+        ValueExpression ve1 = factory.createValueExpression(context, "${testEnum}", String.class);
         String result1 = (String) ve1.getValue(context);
         Assert.assertEquals("APPLE", result1);
 
-        ValueExpression ve2 = factory.createValueExpression(
-                context, "foo${testEnum}bar", String.class);
+        ValueExpression ve2 = factory.createValueExpression(context, "foo${testEnum}bar", String.class);
         String result2 = (String) ve2.getValue(context);
         Assert.assertEquals("fooAPPLEbar", result2);
     }
@@ -149,21 +139,18 @@ public class TestValueExpressionImpl extends ELBaseTest {
         Object o1 = "String value";
         Object o2 = Integer.valueOf(32);
 
-        Map<Object,Object> map = new HashMap<>();
+        Map<Object, Object> map = new HashMap<>();
         map.put("key1", o1);
         map.put("key2", o2);
 
-        ValueExpression var =
-            factory.createValueExpression(map, Map.class);
+        ValueExpression var = factory.createValueExpression(map, Map.class);
         context.getVariableMapper().setVariable("map", var);
 
-        ValueExpression ve1 = factory.createValueExpression(
-                context, "${map.key1}", Object.class);
+        ValueExpression ve1 = factory.createValueExpression(context, "${map.key1}", Object.class);
         ve1.setValue(context, o2);
         Assert.assertEquals(o2, ve1.getValue(context));
 
-        ValueExpression ve2 = factory.createValueExpression(
-                context, "${map.key2}", Object.class);
+        ValueExpression ve2 = factory.createValueExpression(context, "${map.key2}", Object.class);
         ve2.setValue(context, o1);
         Assert.assertEquals(o1, ve2.getValue(context));
     }
@@ -180,17 +167,14 @@ public class TestValueExpressionImpl extends ELBaseTest {
         list.add(0, o1);
         list.add(1, o2);
 
-        ValueExpression var =
-            factory.createValueExpression(list, List.class);
+        ValueExpression var = factory.createValueExpression(list, List.class);
         context.getVariableMapper().setVariable("list", var);
 
-        ValueExpression ve1 = factory.createValueExpression(
-                context, "${list[0]}", Object.class);
+        ValueExpression ve1 = factory.createValueExpression(context, "${list[0]}", Object.class);
         ve1.setValue(context, o2);
         Assert.assertEquals(o2, ve1.getValue(context));
 
-        ValueExpression ve2 = factory.createValueExpression(
-                context, "${list[1]}", Object.class);
+        ValueExpression ve2 = factory.createValueExpression(context, "${list[1]}", Object.class);
         ve2.setValue(context, o1);
         Assert.assertEquals(o1, ve2.getValue(context));
     }
@@ -207,12 +191,10 @@ public class TestValueExpressionImpl extends ELBaseTest {
         TesterBeanA beanA = new TesterBeanA();
         beanA.setValList(Collections.emptyList());
 
-        ValueExpression var =
-            factory.createValueExpression(beanA, TesterBeanA.class);
+        ValueExpression var = factory.createValueExpression(beanA, TesterBeanA.class);
         context.getVariableMapper().setVariable("beanA", var);
 
-        ValueExpression ve = factory.createValueExpression(
-                context, "${beanA.valList.size()}", Integer.class);
+        ValueExpression ve = factory.createValueExpression(context, "${beanA.valList.size()}", Integer.class);
 
         Integer result = (Integer) ve.getValue(context);
         Assert.assertEquals(Integer.valueOf(0), result);
@@ -229,12 +211,10 @@ public class TestValueExpressionImpl extends ELBaseTest {
 
         List<?> list = Collections.emptyList();
 
-        ValueExpression var =
-            factory.createValueExpression(list, List.class);
+        ValueExpression var = factory.createValueExpression(list, List.class);
         context.getVariableMapper().setVariable("list", var);
 
-        ValueExpression ve = factory.createValueExpression(
-                context, "${list.size()}", Integer.class);
+        ValueExpression ve = factory.createValueExpression(context, "${list.size()}", Integer.class);
 
         Integer result = (Integer) ve.getValue(context);
         Assert.assertEquals(Integer.valueOf(0), result);
@@ -248,12 +228,10 @@ public class TestValueExpressionImpl extends ELBaseTest {
 
         TesterBeanB beanB = new TesterBeanB();
         beanB.setName("Tomcat");
-        ValueExpression var =
-            factory.createValueExpression(beanB, TesterBeanB.class);
+        ValueExpression var = factory.createValueExpression(beanB, TesterBeanB.class);
         context.getVariableMapper().setVariable("beanB", var);
 
-        ValueExpression ve = factory.createValueExpression(
-                context, "${beanB.name}", String.class);
+        ValueExpression ve = factory.createValueExpression(context, "${beanB.name}", String.class);
 
         // First check the basics work
         String result = (String) ve.getValue(context);
diff --git a/test/org/apache/el/TesterBeanB.java b/test/org/apache/el/TesterBeanB.java
index f1cd34392e..e98f6eef96 100644
--- a/test/org/apache/el/TesterBeanB.java
+++ b/test/org/apache/el/TesterBeanB.java
@@ -35,7 +35,7 @@ public class TesterBeanB {
         return "Hello " + to + " from " + name;
     }
 
-    public String echo(String...strings) {
+    public String echo(String... strings) {
         if (strings == null) {
             return null;
         }
diff --git a/test/org/apache/el/TesterBeanC.java b/test/org/apache/el/TesterBeanC.java
index 16438529e4..aa4801e50a 100644
--- a/test/org/apache/el/TesterBeanC.java
+++ b/test/org/apache/el/TesterBeanC.java
@@ -20,15 +20,17 @@ public class TesterBeanC {
     public String sayHello(TesterBeanA a, TesterBeanB b) {
         return "AB: Hello " + a.getName() + " from " + b.getName();
     }
+
     public String sayHello(TesterBeanAA a, TesterBeanB b) {
         return "AAB: Hello " + a.getName() + " from " + b.getName();
     }
+
     public String sayHello(TesterBeanA a, TesterBeanBB b) {
         return "ABB: Hello " + a.getName() + " from " + b.getName();
     }
+
     public String sayHello(TesterBeanA a, TesterBeanBB... b) {
-        StringBuilder result =
-            new StringBuilder("ABB[]: Hello " + a.getName() + " from ");
+        StringBuilder result = new StringBuilder("ABB[]: Hello " + a.getName() + " from ");
         for (int i = 0; i < b.length; i++) {
             if (i > 0) {
                 result.append(", ");
diff --git a/test/org/apache/el/TesterBeanF.java b/test/org/apache/el/TesterBeanF.java
index 242cab0af7..42e340c13b 100644
--- a/test/org/apache/el/TesterBeanF.java
+++ b/test/org/apache/el/TesterBeanF.java
@@ -40,13 +40,13 @@ public class TesterBeanF {
 
 
     @SuppressWarnings("unused")
-    public String doTest(TesterEnum param1, TesterEnum... param2 ) {
+    public String doTest(TesterEnum param1, TesterEnum... param2) {
         return "Enum-VEnum";
     }
 
 
     @SuppressWarnings("unused")
-    public String doTest(TesterEnum param1, String... param2 ) {
+    public String doTest(TesterEnum param1, String... param2) {
         return "Enum-VString";
     }
 
@@ -70,13 +70,13 @@ public class TesterBeanF {
 
 
     @SuppressWarnings("unused")
-    public String doTest(String param1, TesterEnum... param2 ) {
+    public String doTest(String param1, TesterEnum... param2) {
         return "String-VEnum";
     }
 
 
     @SuppressWarnings("unused")
-    public String doTest(String param1, String... param2 ) {
+    public String doTest(String param1, String... param2) {
         return "String-VString";
     }
 }
diff --git a/test/org/apache/el/TesterBeanG.java b/test/org/apache/el/TesterBeanG.java
index 4872781637..87a03abbc0 100644
--- a/test/org/apache/el/TesterBeanG.java
+++ b/test/org/apache/el/TesterBeanG.java
@@ -17,9 +17,8 @@
 package org.apache.el;
 
 /**
- * Test cases based on https://bz.apache.org/bugzilla/show_bug.cgi?id=65358
- * BeanG is BeanF with all the methods that use Enum parameters removed so that
- * the EL caller always has to coerce the Enum to String.
+ * Test cases based on https://bz.apache.org/bugzilla/show_bug.cgi?id=65358 BeanG is BeanF with all the methods that use
+ * Enum parameters removed so that the EL caller always has to coerce the Enum to String.
  */
 public class TesterBeanG {
 
@@ -36,7 +35,7 @@ public class TesterBeanG {
 
 
     @SuppressWarnings("unused")
-    public String doTest(String param1, String... param2 ) {
+    public String doTest(String param1, String... param2) {
         return "String-VString";
     }
 }
diff --git a/test/org/apache/el/TesterBeanH.java b/test/org/apache/el/TesterBeanH.java
index 7ebd5c0927..f6d7f0c482 100644
--- a/test/org/apache/el/TesterBeanH.java
+++ b/test/org/apache/el/TesterBeanH.java
@@ -17,13 +17,12 @@
 package org.apache.el;
 
 /**
- * Test cases based on https://bz.apache.org/bugzilla/show_bug.cgi?id=65358
- * BeanH is BeanG with just the varargs method.
+ * Test cases based on https://bz.apache.org/bugzilla/show_bug.cgi?id=65358 BeanH is BeanG with just the varargs method.
  */
 public class TesterBeanH {
 
     @SuppressWarnings("unused")
-    public String doTest(String param1, String... param2 ) {
+    public String doTest(String param1, String... param2) {
         return "String-VString";
     }
 }
diff --git a/test/org/apache/el/TesterEnum.java b/test/org/apache/el/TesterEnum.java
index 241fbbe336..1ff0bbf8d9 100644
--- a/test/org/apache/el/TesterEnum.java
+++ b/test/org/apache/el/TesterEnum.java
@@ -17,7 +17,8 @@
 package org.apache.el;
 
 public enum TesterEnum {
-    APPLE, ORANGE;
+    APPLE,
+    ORANGE;
 
     @Override
     public String toString() {
diff --git a/test/org/apache/el/TesterFunctions.java b/test/org/apache/el/TesterFunctions.java
index ed2478286a..904fba0c89 100644
--- a/test/org/apache/el/TesterFunctions.java
+++ b/test/org/apache/el/TesterFunctions.java
@@ -52,6 +52,7 @@ public class TesterFunctions {
     public static class Inner$Class {
 
         public static final String RETVAL = "Return from bug49555";
+
         public static String bug49555() {
             return RETVAL;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 01/06: Clean-up. Reformatting. No functional change.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 7d81989dba126510a833c2fe0af1ae4efc3cf43d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 22 18:07:54 2023 +0000

    Clean-up. Reformatting. No functional change.
---
 java/jakarta/el/ArrayELResolver.java          |  26 +++---
 java/jakarta/el/BeanELResolver.java           |  52 +++++------
 java/jakarta/el/BeanNameELResolver.java       |   9 +-
 java/jakarta/el/BeanNameResolver.java         |  18 ++--
 java/jakarta/el/CompositeELResolver.java      |   3 +-
 java/jakarta/el/ELContext.java                |  39 ++++-----
 java/jakarta/el/ELContextListener.java        |   1 -
 java/jakarta/el/ELException.java              |  15 ++--
 java/jakarta/el/ELManager.java                |   8 +-
 java/jakarta/el/ELProcessor.java              |  92 ++++++++------------
 java/jakarta/el/ELResolver.java               | 120 +++++++++++---------------
 java/jakarta/el/EvaluationListener.java       |   3 +-
 java/jakarta/el/ExpressionFactory.java        |  69 ++++++---------
 java/jakarta/el/ImportHandler.java            |  68 ++++++---------
 java/jakarta/el/LambdaExpression.java         |  17 ++--
 java/jakarta/el/ListELResolver.java           |  22 ++---
 java/jakarta/el/MapELResolver.java            |  16 ++--
 java/jakarta/el/MethodExpression.java         |  48 ++++-------
 java/jakarta/el/MethodReference.java          |  25 +++---
 java/jakarta/el/ResourceBundleELResolver.java |  13 ++-
 java/jakarta/el/StandardELContext.java        |  30 +++----
 java/jakarta/el/StaticFieldELResolver.java    |  44 ++++------
 java/jakarta/el/TypeConverter.java            |   3 +-
 java/jakarta/el/Util.java                     | 114 +++++++++++-------------
 java/jakarta/el/ValueExpression.java          |  61 +++++--------
 25 files changed, 361 insertions(+), 555 deletions(-)

diff --git a/java/jakarta/el/ArrayELResolver.java b/java/jakarta/el/ArrayELResolver.java
index 116f164e43..f256a069a6 100644
--- a/java/jakarta/el/ArrayELResolver.java
+++ b/java/jakarta/el/ArrayELResolver.java
@@ -36,8 +36,7 @@ public class ArrayELResolver extends ELResolver {
     /**
      * Creates an instance of the standard array resolver.
      *
-     * @param readOnly  {@code true} if the created instance should be read-only
-     *                  otherwise false.
+     * @param readOnly {@code true} if the created instance should be read-only otherwise false.
      */
     public ArrayELResolver(boolean readOnly) {
         this.readOnly = readOnly;
@@ -56,8 +55,8 @@ public class ArrayELResolver extends ELResolver {
                 // ignore
             }
             /*
-             * The resolver may have been created in read-only mode but the
-             * array and its elements will always be read-write.
+             * The resolver may have been created in read-only mode but the array and its elements will always be
+             * read-write.
              */
             if (readOnly) {
                 return null;
@@ -85,24 +84,21 @@ public class ArrayELResolver extends ELResolver {
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         Objects.requireNonNull(context);
 
         if (base != null && base.getClass().isArray()) {
             context.setPropertyResolved(base, property);
 
             if (this.readOnly) {
-                throw new PropertyNotWritableException(Util.message(context,
-                        "resolverNotWritable", base.getClass().getName()));
+                throw new PropertyNotWritableException(
+                        Util.message(context, "resolverNotWritable", base.getClass().getName()));
             }
 
             int idx = coerce(property);
             checkBounds(base, idx);
-            if (value != null && !Util.isAssignableFrom(value.getClass(),
-                    base.getClass().getComponentType())) {
-                throw new ClassCastException(Util.message(context,
-                        "objectNotAssignable", value.getClass().getName(),
+            if (value != null && !Util.isAssignableFrom(value.getClass(), base.getClass().getComponentType())) {
+                throw new ClassCastException(Util.message(context, "objectNotAssignable", value.getClass().getName(),
                         base.getClass().getComponentType().getName()));
             }
             Array.set(base, idx, value);
@@ -136,8 +132,7 @@ public class ArrayELResolver extends ELResolver {
 
     private static void checkBounds(Object base, int idx) {
         if (idx < 0 || idx >= Array.getLength(base)) {
-            throw new PropertyNotFoundException(
-                    new ArrayIndexOutOfBoundsException(idx).getMessage());
+            throw new PropertyNotFoundException(new ArrayIndexOutOfBoundsException(idx).getMessage());
         }
     }
 
@@ -154,8 +149,7 @@ public class ArrayELResolver extends ELResolver {
         if (property instanceof String) {
             return Integer.parseInt((String) property);
         }
-        throw new IllegalArgumentException(property != null ?
-                property.toString() : "null");
+        throw new IllegalArgumentException(property != null ? property.toString() : "null");
     }
 
 }
diff --git a/java/jakarta/el/BeanELResolver.java b/java/jakarta/el/BeanELResolver.java
index 4a5e93cb31..80d46e171f 100644
--- a/java/jakarta/el/BeanELResolver.java
+++ b/java/jakarta/el/BeanELResolver.java
@@ -54,8 +54,7 @@ public class BeanELResolver extends ELResolver {
     /**
      * Creates an instance of the standard JavaBean resolver.
      *
-     * @param readOnly  {@code true} if the created instance should be read-only
-     *                  otherwise false.
+     * @param readOnly {@code true} if the created instance should be read-only otherwise false.
      */
     public BeanELResolver(boolean readOnly) {
         this.readOnly = readOnly;
@@ -92,16 +91,15 @@ public class BeanELResolver extends ELResolver {
         } catch (InvocationTargetException e) {
             Throwable cause = e.getCause();
             Util.handleThrowable(cause);
-            throw new ELException(Util.message(context, "propertyReadError",
-                    base.getClass().getName(), property.toString()), cause);
+            throw new ELException(
+                    Util.message(context, "propertyReadError", base.getClass().getName(), property.toString()), cause);
         } catch (Exception e) {
             throw new ELException(e);
         }
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         Objects.requireNonNull(context);
         if (base == null || property == null) {
             return;
@@ -110,8 +108,8 @@ public class BeanELResolver extends ELResolver {
         context.setPropertyResolved(base, property);
 
         if (this.readOnly) {
-            throw new PropertyNotWritableException(Util.message(context,
-                    "resolverNotWritable", base.getClass().getName()));
+            throw new PropertyNotWritableException(
+                    Util.message(context, "resolverNotWritable", base.getClass().getName()));
         }
 
         Method m = this.property(context, base, property).write(context, base);
@@ -120,8 +118,8 @@ public class BeanELResolver extends ELResolver {
         } catch (InvocationTargetException e) {
             Throwable cause = e.getCause();
             Util.handleThrowable(cause);
-            throw new ELException(Util.message(context, "propertyWriteError",
-                    base.getClass().getName(), property.toString()), cause);
+            throw new ELException(
+                    Util.message(context, "propertyWriteError", base.getClass().getName(), property.toString()), cause);
         } catch (Exception e) {
             throw new ELException(e);
         }
@@ -131,8 +129,7 @@ public class BeanELResolver extends ELResolver {
      * @since EL 2.2
      */
     @Override
-    public Object invoke(ELContext context, Object base, Object method,
-            Class<?>[] paramTypes, Object[] params) {
+    public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
         Objects.requireNonNull(context);
         if (base == null || method == null) {
             return null;
@@ -145,8 +142,8 @@ public class BeanELResolver extends ELResolver {
         // Find the matching method
         Method matchingMethod = Util.findMethod(context, base.getClass(), base, methodName, paramTypes, params);
 
-        Object[] parameters = Util.buildParameters(
-                context, matchingMethod.getParameterTypes(), matchingMethod.isVarArgs(), params);
+        Object[] parameters = Util.buildParameters(context, matchingMethod.getParameterTypes(),
+                matchingMethod.isVarArgs(), params);
 
         Object result = null;
         try {
@@ -194,7 +191,7 @@ public class BeanELResolver extends ELResolver {
             try {
                 BeanInfo info = Introspector.getBeanInfo(this.type);
                 PropertyDescriptor[] pds = info.getPropertyDescriptors();
-                for (PropertyDescriptor pd: pds) {
+                for (PropertyDescriptor pd : pds) {
                     this.properties.put(pd.getName(), new BeanProperty(type, pd));
                 }
                 /*
@@ -214,8 +211,7 @@ public class BeanELResolver extends ELResolver {
                     PropertyDescriptor[] pds = info.getPropertyDescriptors();
                     for (PropertyDescriptor pd : pds) {
                         if (!this.properties.containsKey(pd.getName())) {
-                            this.properties.put(pd.getName(), new BeanProperty(
-                                    this.type, pd));
+                            this.properties.put(pd.getName(), new BeanProperty(this.type, pd));
                         }
                     }
                     populateFromInterfaces(ifs);
@@ -230,8 +226,7 @@ public class BeanELResolver extends ELResolver {
         private BeanProperty get(ELContext ctx, String name) {
             BeanProperty property = this.properties.get(name);
             if (property == null) {
-                throw new PropertyNotFoundException(Util.message(ctx,
-                        "propertyNotFound", type.getName(), name));
+                throw new PropertyNotFoundException(Util.message(ctx, "propertyNotFound", type.getName(), name));
             }
             return property;
         }
@@ -271,9 +266,8 @@ public class BeanELResolver extends ELResolver {
             if (this.write == null) {
                 this.write = Util.getMethod(this.owner, base, descriptor.getWriteMethod());
                 if (this.write == null) {
-                    throw new PropertyNotWritableException(Util.message(ctx,
-                            "propertyNotWritable", new Object[] {
-                                    owner.getName(), descriptor.getName() }));
+                    throw new PropertyNotWritableException(Util.message(ctx, "propertyNotWritable",
+                            new Object[] { owner.getName(), descriptor.getName() }));
                 }
             }
             return this.write;
@@ -283,17 +277,15 @@ public class BeanELResolver extends ELResolver {
             if (this.read == null) {
                 this.read = Util.getMethod(this.owner, base, descriptor.getReadMethod());
                 if (this.read == null) {
-                    throw new PropertyNotFoundException(Util.message(ctx,
-                            "propertyNotReadable", new Object[] {
-                                    owner.getName(), descriptor.getName() }));
+                    throw new PropertyNotFoundException(Util.message(ctx, "propertyNotReadable",
+                            new Object[] { owner.getName(), descriptor.getName() }));
                 }
             }
             return this.read;
         }
     }
 
-    private BeanProperty property(ELContext ctx, Object base,
-            Object property) {
+    private BeanProperty property(ELContext ctx, Object base, Object property) {
         Class<?> type = base.getClass();
         String prop = property.toString();
 
@@ -306,11 +298,11 @@ public class BeanELResolver extends ELResolver {
         return props.get(ctx, prop);
     }
 
-    private static final class ConcurrentCache<K,V> {
+    private static final class ConcurrentCache<K, V> {
 
         private final int size;
-        private final Map<K,V> eden;
-        private final Map<K,V> longterm;
+        private final Map<K, V> eden;
+        private final Map<K, V> longterm;
 
         ConcurrentCache(int size) {
             this.size = size;
diff --git a/java/jakarta/el/BeanNameELResolver.java b/java/jakarta/el/BeanNameELResolver.java
index bb8a93a977..9ef745150a 100644
--- a/java/jakarta/el/BeanNameELResolver.java
+++ b/java/jakarta/el/BeanNameELResolver.java
@@ -53,8 +53,7 @@ public class BeanNameELResolver extends ELResolver {
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         Objects.requireNonNull(context);
         if (base != null || !(property instanceof String)) {
             return;
@@ -75,12 +74,10 @@ public class BeanNameELResolver extends ELResolver {
         }
 
         if (isReadOnly) {
-            throw new PropertyNotWritableException(Util.message(context,
-                    "beanNameELResolver.beanReadOnly", beanName));
+            throw new PropertyNotWritableException(Util.message(context, "beanNameELResolver.beanReadOnly", beanName));
         }
 
-        if (beanNameResolver.isNameResolved(beanName) ||
-                beanNameResolver.canCreateBean(beanName)) {
+        if (beanNameResolver.isNameResolved(beanName) || beanNameResolver.canCreateBean(beanName)) {
             try {
                 beanNameResolver.setBeanValue(beanName, value);
                 context.setPropertyResolved(base, property);
diff --git a/java/jakarta/el/BeanNameResolver.java b/java/jakarta/el/BeanNameResolver.java
index fbf60f31ef..17754a1553 100644
--- a/java/jakarta/el/BeanNameResolver.java
+++ b/java/jakarta/el/BeanNameResolver.java
@@ -17,8 +17,8 @@
 package jakarta.el;
 
 /**
- * Base implementation that provides a minimal default implementation that is
- * intended to be extended by application developers.
+ * Base implementation that provides a minimal default implementation that is intended to be extended by application
+ * developers.
  *
  * @since EL 3.0
  */
@@ -49,17 +49,15 @@ public abstract class BeanNameResolver {
 
 
     /**
-     * Sets a value of a bean of the given name. If the named bean does not
-     * exist and {@link #canCreateBean} returns <code>true</code> then a bean
-     * is created with the given value.
+     * Sets a value of a bean of the given name. If the named bean does not exist and {@link #canCreateBean} returns
+     * <code>true</code> then a bean is created with the given value.
      *
      * @param beanName The name of the bean to be set/create
      * @param value    The value of the bean to set/create
      *
      * @throws PropertyNotWritableException if the bean is read only
      */
-    public void setBeanValue(String beanName, Object value)
-            throws PropertyNotWritableException {
+    public void setBeanValue(String beanName, Object value) throws PropertyNotWritableException {
         throw new PropertyNotWritableException();
     }
 
@@ -69,8 +67,7 @@ public abstract class BeanNameResolver {
      *
      * @param beanName The name of the bean of interest
      *
-     * @return <code>true</code> if the bean is read only, otherwise
-     *         <code>false</code>
+     * @return <code>true</code> if the bean is read only, otherwise <code>false</code>
      */
     public boolean isReadOnly(String beanName) {
         return true;
@@ -82,8 +79,7 @@ public abstract class BeanNameResolver {
      *
      * @param beanName The name of the bean of interest
      *
-     * @return <code>true</code> if the bean may be created, otherwise
-     *         <code>false</code>
+     * @return <code>true</code> if the bean may be created, otherwise <code>false</code>
      */
     public boolean canCreateBean(String beanName) {
         return false;
diff --git a/java/jakarta/el/CompositeELResolver.java b/java/jakarta/el/CompositeELResolver.java
index 2190ac869e..4c844371d6 100644
--- a/java/jakarta/el/CompositeELResolver.java
+++ b/java/jakarta/el/CompositeELResolver.java
@@ -68,8 +68,7 @@ public class CompositeELResolver extends ELResolver {
      * @since EL 2.2
      */
     @Override
-    public Object invoke(ELContext context, Object base, Object method,
-            Class<?>[] paramTypes, Object[] params) {
+    public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
         context.setPropertyResolved(false);
         int sz = this.size;
         for (int i = 0; i < sz; i++) {
diff --git a/java/jakarta/el/ELContext.java b/java/jakarta/el/ELContext.java
index 6ef3001423..0f6d221cc9 100644
--- a/java/jakarta/el/ELContext.java
+++ b/java/jakarta/el/ELContext.java
@@ -38,7 +38,7 @@ public abstract class ELContext {
 
     private List<EvaluationListener> listeners;
 
-    private Deque<Map<String,Object>> lambdaArguments = new ArrayDeque<>();
+    private Deque<Map<String, Object>> lambdaArguments = new ArrayDeque<>();
 
     public ELContext() {
         this.resolved = false;
@@ -71,8 +71,7 @@ public abstract class ELContext {
      * @param key           The key under which to store the object
      * @param contextObject The object to add
      *
-     * @throws NullPointerException
-     *              If the supplied key or context is <code>null</code>
+     * @throws NullPointerException If the supplied key or context is <code>null</code>
      */
     public void putContext(Class<?> key, Object contextObject) {
         Objects.requireNonNull(key);
@@ -92,8 +91,7 @@ public abstract class ELContext {
      *
      * @return The value of the context object associated with the given key
      *
-     * @throws NullPointerException
-     *              If the supplied key is <code>null</code>
+     * @throws NullPointerException If the supplied key is <code>null</code>
      */
     public Object getContext(Class<?> key) {
         Objects.requireNonNull(key);
@@ -106,8 +104,7 @@ public abstract class ELContext {
     public abstract ELResolver getELResolver();
 
     /**
-     * Obtain the ImportHandler for this ELContext, creating one if necessary.
-     * This method is not thread-safe.
+     * Obtain the ImportHandler for this ELContext, creating one if necessary. This method is not thread-safe.
      *
      * @return the ImportHandler for this ELContext.
      *
@@ -226,18 +223,17 @@ public abstract class ELContext {
     }
 
     /**
-     * Determine if the specified name is recognised as the name of a lambda
-     * argument.
+     * Determine if the specified name is recognised as the name of a lambda argument.
      *
      * @param name The name of the lambda argument
      *
-     * @return <code>true</code> if the name is recognised as the name of a
-     *         lambda argument, otherwise <code>false</code>
+     * @return <code>true</code> if the name is recognised as the name of a lambda argument, otherwise
+     *             <code>false</code>
      *
      * @since EL 3.0
      */
     public boolean isLambdaArgument(String name) {
-        for (Map<String,Object> arguments : lambdaArguments) {
+        for (Map<String, Object> arguments : lambdaArguments) {
             if (arguments.containsKey(name)) {
                 return true;
             }
@@ -255,7 +251,7 @@ public abstract class ELContext {
      * @since EL 3.0
      */
     public Object getLambdaArgument(String name) {
-        for (Map<String,Object> arguments : lambdaArguments) {
+        for (Map<String, Object> arguments : lambdaArguments) {
             Object result = arguments.get(name);
             if (result != null) {
                 return result;
@@ -265,20 +261,19 @@ public abstract class ELContext {
     }
 
     /**
-     * Called when starting to evaluate a lambda expression so that the
-     * arguments are available to the EL context during evaluation.
+     * Called when starting to evaluate a lambda expression so that the arguments are available to the EL context during
+     * evaluation.
+     *
+     * @param arguments The arguments in scope for the current lambda expression.
      *
-     * @param arguments The arguments in scope for the current lambda
-     *                  expression.
      * @since EL 3.0
      */
-    public void enterLambdaScope(Map<String,Object> arguments) {
+    public void enterLambdaScope(Map<String, Object> arguments) {
         lambdaArguments.push(arguments);
     }
 
     /**
-     * Called after evaluating a lambda expression to signal that the arguments
-     * are no longer required.
+     * Called after evaluating a lambda expression to signal that the arguments are no longer required.
      *
      * @since EL 3.0
      */
@@ -290,14 +285,12 @@ public abstract class ELContext {
      * Coerce the supplied object to the requested type.
      *
      * @param <T>  The type to which the object should be coerced
-     *
      * @param obj  The object to be coerced
      * @param type The type to which the object should be coerced
      *
      * @return An instance of the requested type.
      *
-     * @throws ELException
-     *              If the conversion fails
+     * @throws ELException If the conversion fails
      *
      * @since EL 3.0
      */
diff --git a/java/jakarta/el/ELContextListener.java b/java/jakarta/el/ELContextListener.java
index 99da2c7514..9c7f735607 100644
--- a/java/jakarta/el/ELContextListener.java
+++ b/java/jakarta/el/ELContextListener.java
@@ -18,7 +18,6 @@ package jakarta.el;
 
 /**
  * @author Jacob Hookom [jacob/hookom.net]
- *
  */
 public interface ELContextListener extends java.util.EventListener {
 
diff --git a/java/jakarta/el/ELException.java b/java/jakarta/el/ELException.java
index 225a02343a..ab18aeeef6 100644
--- a/java/jakarta/el/ELException.java
+++ b/java/jakarta/el/ELException.java
@@ -17,8 +17,7 @@
 package jakarta.el;
 
 /**
- * Represents any of the exception conditions that can arise during expression
- * evaluation.
+ * Represents any of the exception conditions that can arise during expression evaluation.
  *
  * @since 2.1
  */
@@ -36,8 +35,7 @@ public class ELException extends RuntimeException {
     /**
      * Creates an ELException with the provided detail message.
      *
-     * @param message
-     *            the detail message
+     * @param message the detail message
      */
     public ELException(String message) {
         super(message);
@@ -46,8 +44,7 @@ public class ELException extends RuntimeException {
     /**
      * Creates an ELException with the given cause
      *
-     * @param cause
-     *            the originating cause of this exception
+     * @param cause the originating cause of this exception
      */
     public ELException(Throwable cause) {
         super(cause);
@@ -56,10 +53,8 @@ public class ELException extends RuntimeException {
     /**
      * Creates an ELException with the given detail message and root cause.
      *
-     * @param message
-     *            the detail message
-     * @param cause
-     *            the originating cause of this exception
+     * @param message the detail message
+     * @param cause   the originating cause of this exception
      */
     public ELException(String message, Throwable cause) {
         super(message, cause);
diff --git a/java/jakarta/el/ELManager.java b/java/jakarta/el/ELManager.java
index 362368894c..b3787bbd3e 100644
--- a/java/jakarta/el/ELManager.java
+++ b/java/jakarta/el/ELManager.java
@@ -53,16 +53,14 @@ public class ELManager {
     }
 
     public void mapFunction(String prefix, String function, Method method) {
-        getELContext().getFunctionMapper().mapFunction(
-                prefix, function, method);
+        getELContext().getFunctionMapper().mapFunction(prefix, function, method);
     }
 
     public void setVariable(String variable, ValueExpression expression) {
         getELContext().getVariableMapper().setVariable(variable, expression);
     }
 
-    public void importStatic(String staticMemberName)
-            throws jakarta.el.ELException {
+    public void importStatic(String staticMemberName) throws jakarta.el.ELException {
         getELContext().getImportHandler().importStatic(staticMemberName);
     }
 
@@ -75,7 +73,7 @@ public class ELManager {
     }
 
     public Object defineBean(String name, Object bean) {
-        Map<String,Object> localBeans = getELContext().getLocalBeans();
+        Map<String, Object> localBeans = getELContext().getLocalBeans();
 
         if (bean == null) {
             return localBeans.remove(name);
diff --git a/java/jakarta/el/ELProcessor.java b/java/jakarta/el/ELProcessor.java
index c602ad8868..7653413f2b 100644
--- a/java/jakarta/el/ELProcessor.java
+++ b/java/jakarta/el/ELProcessor.java
@@ -58,15 +58,13 @@ public class ELProcessor {
 
 
     public <T> T getValue(String expression, Class<T> expectedType) {
-        ValueExpression ve = factory.createValueExpression(
-                context, bracket(expression), expectedType);
+        ValueExpression ve = factory.createValueExpression(context, bracket(expression), expectedType);
         return ve.getValue(context);
     }
 
 
     public void setValue(String expression, Object value) {
-        ValueExpression ve = factory.createValueExpression(
-                context, bracket(expression), Object.class);
+        ValueExpression ve = factory.createValueExpression(context, bracket(expression), Object.class);
         ve.setValue(context, value);
     }
 
@@ -75,21 +73,17 @@ public class ELProcessor {
         if (expression == null) {
             manager.setVariable(variable, null);
         } else {
-            ValueExpression ve = factory.createValueExpression(
-                    context, bracket(expression), Object.class);
+            ValueExpression ve = factory.createValueExpression(context, bracket(expression), Object.class);
             manager.setVariable(variable, ve);
         }
     }
 
 
-    public void defineFunction(String prefix, String function, String className,
-            String methodName) throws ClassNotFoundException,
-            NoSuchMethodException {
+    public void defineFunction(String prefix, String function, String className, String methodName)
+            throws ClassNotFoundException, NoSuchMethodException {
 
-        if (prefix == null || function == null || className == null ||
-                methodName == null) {
-            throw new NullPointerException(Util.message(
-                    context, "elProcessor.defineFunctionNullParams"));
+        if (prefix == null || function == null || className == null || methodName == null) {
+            throw new NullPointerException(Util.message(context, "elProcessor.defineFunctionNullParams"));
         }
 
         // Check the imports
@@ -100,12 +94,11 @@ public class ELProcessor {
         }
 
         if (!Modifier.isPublic(clazz.getModifiers())) {
-            throw new ClassNotFoundException(Util.message(context,
-                    "elProcessor.defineFunctionInvalidClass", className));
+            throw new ClassNotFoundException(
+                    Util.message(context, "elProcessor.defineFunctionInvalidClass", className));
         }
 
-        MethodSignature sig =
-                new MethodSignature(context, methodName, className);
+        MethodSignature sig = new MethodSignature(context, methodName, className);
 
         if (function.length() == 0) {
             function = sig.getName();
@@ -140,7 +133,7 @@ public class ELProcessor {
                     if (types.length == typeNames.length) {
                         boolean match = true;
                         for (int i = 0; i < types.length; i++) {
-                            if (i == types.length -1 && method.isVarArgs()) {
+                            if (i == types.length - 1 && method.isVarArgs()) {
                                 String typeName = typeNames[i];
                                 if (typeName.endsWith("...")) {
                                     typeName = typeName.substring(0, typeName.length() - 3);
@@ -164,38 +157,33 @@ public class ELProcessor {
             }
         }
 
-        throw new NoSuchMethodException(Util.message(context,
-                "elProcessor.defineFunctionNoMethod", methodName, className));
+        throw new NoSuchMethodException(
+                Util.message(context, "elProcessor.defineFunctionNoMethod", methodName, className));
     }
 
 
     /**
      * Map a method to a function name.
      *
-     * @param prefix    Function prefix
-     * @param function  Function name
-     * @param method    Method
+     * @param prefix   Function prefix
+     * @param function Function name
+     * @param method   Method
      *
-     * @throws NullPointerException
-     *              If any of the arguments are null
-     * @throws NoSuchMethodException
-     *              If the method is not static
+     * @throws NullPointerException  If any of the arguments are null
+     * @throws NoSuchMethodException If the method is not static
      */
-    public void defineFunction(String prefix, String function, Method method)
-            throws java.lang.NoSuchMethodException {
+    public void defineFunction(String prefix, String function, Method method) throws java.lang.NoSuchMethodException {
 
         if (prefix == null || function == null || method == null) {
-            throw new NullPointerException(Util.message(
-                    context, "elProcessor.defineFunctionNullParams"));
+            throw new NullPointerException(Util.message(context, "elProcessor.defineFunctionNullParams"));
         }
 
         int modifiers = method.getModifiers();
 
         // Check for static, public method and module access
         if (!Modifier.isStatic(modifiers) || !Util.canAccess(null, method)) {
-            throw new NoSuchMethodException(Util.message(context,
-                    "elProcessor.defineFunctionInvalidMethod", method.getName(),
-                    method.getDeclaringClass().getName()));
+            throw new NoSuchMethodException(Util.message(context, "elProcessor.defineFunctionInvalidMethod",
+                    method.getName(), method.getDeclaringClass().getName()));
         }
 
         manager.mapFunction(prefix, function, method);
@@ -216,8 +204,7 @@ public class ELProcessor {
         private final String name;
         private final String[] parameterTypeNames;
 
-        MethodSignature(ELContext context, String methodName,
-                String className) throws NoSuchMethodException {
+        MethodSignature(ELContext context, String methodName, String className) throws NoSuchMethodException {
 
             int paramIndex = methodName.indexOf('(');
 
@@ -245,8 +232,7 @@ public class ELProcessor {
                 // We know the params start with '(', check they end with ')'
                 if (!paramString.endsWith(")")) {
                     throw new NoSuchMethodException(Util.message(context,
-                            "elProcessor.defineFunctionInvalidParameterList",
-                            paramString, methodName, className));
+                            "elProcessor.defineFunctionInvalidParameterList", paramString, methodName, className));
                 }
                 // Trim '(' and ')'
                 paramString = paramString.substring(1, paramString.length() - 1).trim();
@@ -260,11 +246,10 @@ public class ELProcessor {
                         int dimension = 0;
                         int bracketPos = parameterTypeName.indexOf('[');
                         if (bracketPos > -1) {
-                            String parameterTypeNameOnly =
-                                    parameterTypeName.substring(0, bracketPos).trim();
+                            String parameterTypeNameOnly = parameterTypeName.substring(0, bracketPos).trim();
                             while (bracketPos > -1) {
                                 dimension++;
-                                bracketPos = parameterTypeName.indexOf('[', bracketPos+ 1);
+                                bracketPos = parameterTypeName.indexOf('[', bracketPos + 1);
                             }
                             parameterTypeName = parameterTypeNameOnly;
                         }
@@ -272,14 +257,12 @@ public class ELProcessor {
                         if (parameterTypeName.endsWith("...")) {
                             varArgs = true;
                             dimension = 1;
-                            parameterTypeName = parameterTypeName.substring(
-                                    0, parameterTypeName.length() -3).trim();
+                            parameterTypeName = parameterTypeName.substring(0, parameterTypeName.length() - 3).trim();
                         }
                         boolean isPrimitive = PRIMITIVES.contains(parameterTypeName);
                         if (isPrimitive && dimension > 0) {
                             // When in an array, class name changes for primitive
-                            switch(parameterTypeName)
-                            {
+                            switch (parameterTypeName) {
                                 case "boolean":
                                     parameterTypeName = "Z";
                                     break;
@@ -308,16 +291,12 @@ public class ELProcessor {
                                     // Should never happen
                                     break;
                             }
-                        } else  if (!isPrimitive &&
-                                !parameterTypeName.contains(".")) {
-                            Class<?> clazz = importHandler.resolveClass(
-                                    parameterTypeName);
+                        } else if (!isPrimitive && !parameterTypeName.contains(".")) {
+                            Class<?> clazz = importHandler.resolveClass(parameterTypeName);
                             if (clazz == null) {
-                                throw new NoSuchMethodException(Util.message(
-                                        context,
-                                        "elProcessor.defineFunctionInvalidParameterTypeName",
-                                        parameterTypeNames[i], methodName,
-                                        className));
+                                throw new NoSuchMethodException(
+                                        Util.message(context, "elProcessor.defineFunctionInvalidParameterTypeName",
+                                                parameterTypeNames[i], methodName, className));
                             }
                             parameterTypeName = clazz.getName();
                         }
@@ -351,9 +330,8 @@ public class ELProcessor {
         }
 
         /**
-         * @return <code>null</code> if just the method name was specified, an
-         *         empty List if an empty parameter list was specified - i.e. ()
-         *         - otherwise an ordered list of parameter type names
+         * @return <code>null</code> if just the method name was specified, an empty List if an empty parameter list was
+         *             specified - i.e. () - otherwise an ordered list of parameter type names
          */
         public String[] getParamTypeNames() {
             return parameterTypeNames;
diff --git a/java/jakarta/el/ELResolver.java b/java/jakarta/el/ELResolver.java
index f33d3dd25e..49f6a5a105 100644
--- a/java/jakarta/el/ELResolver.java
+++ b/java/jakarta/el/ELResolver.java
@@ -18,7 +18,6 @@ package jakarta.el;
 
 /**
  * @author Jacob Hookom [jacob/hookom.net]
- *
  */
 public abstract class ELResolver {
 
@@ -27,28 +26,24 @@ public abstract class ELResolver {
     public static final String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime";
 
     /**
-     * Obtain the value of the given property on the given object using the
-     * given context.
+     * Obtain the value of the given property on the given object using the given context.
      *
-     * @param context The EL context for this evaluation
-     * @param base The base object on which the property is to be found
+     * @param context  The EL context for this evaluation
+     * @param base     The base object on which the property is to be found
      * @param property The property whose value is to be returned
+     *
      * @return the value of the provided property
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If the base/property combination provided to the resolver is
-     *              one that the resolver can handle but no match was found or a
-     *              match was found but was not readable
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving the property
+     *
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If the base/property combination provided to the resolver is one that the
+     *                                       resolver can handle but no match was found or a match was found but was not
+     *                                       readable
+     * @throws ELException               Wraps any exception throw whilst resolving the property
      */
-    public abstract Object getValue(ELContext context, Object base,
-            Object property);
+    public abstract Object getValue(ELContext context, Object base, Object property);
 
     /**
-     * Invokes a method on the the given object. This default implementation
-     * always returns <code>null</code>.
+     * Invokes a method on the the given object. This default implementation always returns <code>null</code>.
      *
      * @param context    The EL context for this evaluation
      * @param base       The base object on which the method is to be found
@@ -60,91 +55,74 @@ public abstract class ELResolver {
      *
      * @since EL 2.2
      */
-    public Object invoke(ELContext context, Object base, Object method,
-            Class<?>[] paramTypes, Object[] params) {
+    public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
         return null;
     }
 
     /**
-     * Obtain the type of the given property on the given object using the given
-     * context.
+     * Obtain the type of the given property on the given object using the given context.
      *
-     * @param context The EL context for this evaluation
-     * @param base The base object on which the property is to be found
+     * @param context  The EL context for this evaluation
+     * @param base     The base object on which the property is to be found
      * @param property The property whose type is to be returned
+     *
      * @return the type of the provided property
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If the base/property combination provided to the resolver is
-     *              one that the resolver can handle but no match was found or a
-     *              match was found but was not readable
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving the property
+     *
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If the base/property combination provided to the resolver is one that the
+     *                                       resolver can handle but no match was found or a match was found but was not
+     *                                       readable
+     * @throws ELException               Wraps any exception throw whilst resolving the property
      */
-    public abstract Class<?> getType(ELContext context, Object base,
-            Object property);
+    public abstract Class<?> getType(ELContext context, Object base, Object property);
 
     /**
-     * Set the value of the given property on the given object using the given
-     * context.
+     * Set the value of the given property on the given object using the given context.
      *
      * @param context  The EL context for this evaluation
      * @param base     The base object on which the property is to be found
      * @param property The property whose value is to be set
      * @param value    The value to set the property to
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If the base/property combination provided to the resolver is
-     *              one that the resolver can handle but no match was found
-     * @throws PropertyNotWritableException
-     *              If the base/property combination provided to the resolver is
-     *              one that the resolver can handle but the property was not
-     *              writable
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving the property
+     *
+     * @throws NullPointerException         If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException    If the base/property combination provided to the resolver is one that the
+     *                                          resolver can handle but no match was found
+     * @throws PropertyNotWritableException If the base/property combination provided to the resolver is one that the
+     *                                          resolver can handle but the property was not writable
+     * @throws ELException                  Wraps any exception throw whilst resolving the property
      */
-    public abstract void setValue(ELContext context, Object base,
-            Object property, Object value);
+    public abstract void setValue(ELContext context, Object base, Object property, Object value);
 
     /**
-     * Determine if the given property on the given object is read-only using
-     * the given context.
+     * Determine if the given property on the given object is read-only using the given context.
      *
-     * @param context The EL context for this evaluation
-     * @param base The base object on which the property is to be found
+     * @param context  The EL context for this evaluation
+     * @param base     The base object on which the property is to be found
      * @param property The property to be checked for read only status
-     * @return <code>true</code> if the identified property is read only,
-     *         otherwise <code>false</code>
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If the base/property combination provided to the resolver is
-     *              one that the resolver can handle but no match was found
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving the property
+     *
+     * @return <code>true</code> if the identified property is read only, otherwise <code>false</code>
+     *
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If the base/property combination provided to the resolver is one that the
+     *                                       resolver can handle but no match was found
+     * @throws ELException               Wraps any exception throw whilst resolving the property
      */
-    public abstract boolean isReadOnly(ELContext context, Object base,
-            Object property);
+    public abstract boolean isReadOnly(ELContext context, Object base, Object property);
 
     /**
      * Obtain the most common type that is acceptable for the given base object.
      *
      * @param context The context in which the examination takes place
-     * @param base The object to examine
+     * @param base    The object to examine
      *
-     * @return {code null} if the most common type cannot be determine,
-     *         otherwise the most common type
+     * @return {code null} if the most common type cannot be determine, otherwise the most common type
      */
-    public abstract Class<?> getCommonPropertyType(ELContext context,
-            Object base);
+    public abstract Class<?> getCommonPropertyType(ELContext context, Object base);
 
     /**
-     * Converts the given object to the given type. This default implementation
-     * always returns <code>null</code>.
-     * @param <T>     The type to which the object should be converted
+     * Converts the given object to the given type. This default implementation always returns <code>null</code>.
      *
+     * @param <T>     The type to which the object should be converted
      * @param context The EL context for this evaluation
      * @param obj     The object to convert
      * @param type    The type to which the object should be converted
diff --git a/java/jakarta/el/EvaluationListener.java b/java/jakarta/el/EvaluationListener.java
index a1bb3d0c91..68c30985e0 100644
--- a/java/jakarta/el/EvaluationListener.java
+++ b/java/jakarta/el/EvaluationListener.java
@@ -24,8 +24,7 @@ public abstract class EvaluationListener {
     /**
      * Fired before the evaluation of the expression.
      *
-     * @param context    The EL context in which the expression will be
-     *                   evaluated
+     * @param context    The EL context in which the expression will be evaluated
      * @param expression The expression that will be evaluated
      */
     public void beforeEvaluation(ELContext context, String expression) {
diff --git a/java/jakarta/el/ExpressionFactory.java b/java/jakarta/el/ExpressionFactory.java
index 1999547313..546c7d2736 100644
--- a/java/jakarta/el/ExpressionFactory.java
+++ b/java/jakarta/el/ExpressionFactory.java
@@ -41,22 +41,21 @@ public abstract class ExpressionFactory {
 
     private static final String PROPERTY_NAME = "jakarta.el.ExpressionFactory";
 
-    private static final String PROPERTY_FILE =
-            System.getProperty("java.home") + File.separator + "lib" + File.separator + "el.properties";
+    private static final String PROPERTY_FILE = System.getProperty("java.home") + File.separator + "lib" +
+            File.separator + "el.properties";
 
     private static final CacheValue nullTcclFactory = new CacheValue();
     private static final Map<CacheKey, CacheValue> factoryCache = new ConcurrentHashMap<>();
 
     /**
-     * Create a new {@link ExpressionFactory}. The class to use is determined by
-     * the following search order:
+     * Create a new {@link ExpressionFactory}. The class to use is determined by the following search order:
      * <ol>
      * <li>services API (META-INF/services/jakarta.el.ExpressionFactory)</li>
      * <li>$JRE_HOME/lib/el.properties - key jakarta.el.ExpressionFactory</li>
      * <li>jakarta.el.ExpressionFactory</li>
-     * <li>Platform default implementation -
-     *     org.apache.el.ExpressionFactoryImpl</li>
+     * <li>Platform default implementation - org.apache.el.ExpressionFactoryImpl</li>
      * </ol>
+     *
      * @return the new ExpressionFactory
      */
     public static ExpressionFactory newInstance() {
@@ -64,10 +63,11 @@ public abstract class ExpressionFactory {
     }
 
     /**
-     * Create a new {@link ExpressionFactory} passing in the provided
-     * {@link Properties}. Search order is the same as {@link #newInstance()}.
+     * Create a new {@link ExpressionFactory} passing in the provided {@link Properties}. Search order is the same as
+     * {@link #newInstance()}.
      *
      * @param properties the properties to be passed to the new instance (may be null)
+     *
      * @return the new ExpressionFactory
      */
     public static ExpressionFactory newInstance(Properties properties) {
@@ -141,8 +141,7 @@ public abstract class ExpressionFactory {
             if (constructor == null) {
                 result = (ExpressionFactory) clazz.getConstructor().newInstance();
             } else {
-                result =
-                    (ExpressionFactory) constructor.newInstance(properties);
+                result = (ExpressionFactory) constructor.newInstance(properties);
             }
 
         } catch (InvocationTargetException e) {
@@ -161,54 +160,43 @@ public abstract class ExpressionFactory {
      *
      * @param context      The EL context for this evaluation
      * @param expression   The String representation of the value expression
-     * @param expectedType The expected type of the result of evaluating the
-     *                     expression
+     * @param expectedType The expected type of the result of evaluating the expression
      *
      * @return A new value expression formed from the input parameters
      *
-     * @throws NullPointerException
-     *              If the expected type is <code>null</code>
-     * @throws ELException
-     *              If there are syntax errors in the provided expression
+     * @throws NullPointerException If the expected type is <code>null</code>
+     * @throws ELException          If there are syntax errors in the provided expression
      */
-    public abstract ValueExpression createValueExpression(ELContext context,
-            String expression, Class<?> expectedType);
+    public abstract ValueExpression createValueExpression(ELContext context, String expression, Class<?> expectedType);
 
-    public abstract ValueExpression createValueExpression(Object instance,
-            Class<?> expectedType);
+    public abstract ValueExpression createValueExpression(Object instance, Class<?> expectedType);
 
     /**
      * Create a new method expression instance.
      *
      * @param context            The EL context for this evaluation
-     * @param expression         The String representation of the method
-     *                           expression
-     * @param expectedReturnType The expected type of the result of invoking the
-     *                           method
+     * @param expression         The String representation of the method expression
+     * @param expectedReturnType The expected type of the result of invoking the method
      * @param expectedParamTypes The expected types of the input parameters
      *
      * @return A new method expression formed from the input parameters.
      *
-     * @throws NullPointerException
-     *              If the expected parameters types are <code>null</code>
-     * @throws ELException
-     *              If there are syntax errors in the provided expression
+     * @throws NullPointerException If the expected parameters types are <code>null</code>
+     * @throws ELException          If there are syntax errors in the provided expression
      */
-    public abstract MethodExpression createMethodExpression(ELContext context,
-            String expression, Class<?> expectedReturnType,
-            Class<?>[] expectedParamTypes);
+    public abstract MethodExpression createMethodExpression(ELContext context, String expression,
+            Class<?> expectedReturnType, Class<?>[] expectedParamTypes);
 
     /**
      * Coerce the supplied object to the requested type.
-     * @param <T>          The type to which the object should be coerced
      *
+     * @param <T>          The type to which the object should be coerced
      * @param obj          The object to be coerced
      * @param expectedType The type to which the object should be coerced
      *
      * @return An instance of the requested type.
      *
-     * @throws ELException
-     *              If the conversion fails
+     * @throws ELException If the conversion fails
      */
     public abstract <T> T coerceToType(Object obj, Class<T> expectedType);
 
@@ -226,14 +214,13 @@ public abstract class ExpressionFactory {
      *
      * @since EL 3.0
      */
-    public Map<String,Method> getInitFunctionMap() {
+    public Map<String, Method> getInitFunctionMap() {
         return null;
     }
 
     /**
-     * Key used to cache ExpressionFactory discovery information per class
-     * loader. The class loader reference is never {@code null}, because
-     * {@code null} tccl is handled separately.
+     * Key used to cache ExpressionFactory discovery information per class loader. The class loader reference is never
+     * {@code null}, because {@code null} tccl is handled separately.
      */
     private static class CacheKey {
         private final int hash;
@@ -297,8 +284,8 @@ public abstract class ExpressionFactory {
     /**
      * Discover the name of class that implements ExpressionFactory.
      *
-     * @param tccl
-     *            {@code ClassLoader}
+     * @param tccl {@code ClassLoader}
+     *
      * @return Class name. There is default, so it is never {@code null}.
      */
     private static String discoverClassName(ClassLoader tccl) {
@@ -341,7 +328,7 @@ public abstract class ExpressionFactory {
     private static String getClassNameJreDir() {
         File file = new File(PROPERTY_FILE);
         if (file.canRead()) {
-            try (InputStream is = new FileInputStream(file)){
+            try (InputStream is = new FileInputStream(file)) {
                 Properties props = new Properties();
                 props.load(is);
                 String value = props.getProperty(PROPERTY_NAME);
diff --git a/java/jakarta/el/ImportHandler.java b/java/jakarta/el/ImportHandler.java
index 75faffc689..936ec97bf3 100644
--- a/java/jakarta/el/ImportHandler.java
+++ b/java/jakarta/el/ImportHandler.java
@@ -31,7 +31,7 @@ import java.util.concurrent.ConcurrentHashMap;
  */
 public class ImportHandler {
 
-    private static final Map<String,Set<String>> standardPackages = new HashMap<>();
+    private static final Map<String, Set<String>> standardPackages = new HashMap<>();
 
     static {
         // Servlet 6.0
@@ -118,7 +118,7 @@ public class ImportHandler {
 
         // JSP 3.0
         Set<String> servletJspClassNames = new HashSet<>();
-        //Interfaces
+        // Interfaces
         servletJspClassNames.add("HttpJspPage");
         servletJspClassNames.add("JspApplicationContext");
         servletJspClassNames.add("JspPage");
@@ -154,7 +154,7 @@ public class ImportHandler {
         javaLangClassNames.add("Thread.Builder.OfPlatform");
         javaLangClassNames.add("Thread.Builder.OfVirtual");
         javaLangClassNames.add("Thread.UncaughtExceptionHandler");
-        //Classes
+        // Classes
         javaLangClassNames.add("Boolean");
         javaLangClassNames.add("Byte");
         javaLangClassNames.add("Character");
@@ -200,13 +200,13 @@ public class ImportHandler {
         javaLangClassNames.add("ThreadLocal");
         javaLangClassNames.add("Throwable");
         javaLangClassNames.add("Void");
-        //Enums
+        // Enums
         javaLangClassNames.add("Character.UnicodeScript");
         javaLangClassNames.add("ProcessBuilder.Redirect.Type");
         javaLangClassNames.add("StackWalker.Option");
         javaLangClassNames.add("System.Logger.Level");
         javaLangClassNames.add("Thread.State");
-        //Exceptions
+        // Exceptions
         javaLangClassNames.add("ArithmeticException");
         javaLangClassNames.add("ArrayIndexOutOfBoundsException");
         javaLangClassNames.add("ArrayStoreException");
@@ -238,7 +238,7 @@ public class ImportHandler {
         javaLangClassNames.add("TypeNotPresentException");
         javaLangClassNames.add("UnsupportedOperationException");
         javaLangClassNames.add("WrongThreadException");
-        //Errors
+        // Errors
         javaLangClassNames.add("AbstractMethodError");
         javaLangClassNames.add("AssertionError");
         javaLangClassNames.add("BootstrapMethodError");
@@ -262,7 +262,7 @@ public class ImportHandler {
         javaLangClassNames.add("UnsupportedClassVersionError");
         javaLangClassNames.add("VerifyError");
         javaLangClassNames.add("VirtualMachineError");
-        //Annotation Types
+        // Annotation Types
         javaLangClassNames.add("Deprecated");
         javaLangClassNames.add("FunctionalInterface");
         javaLangClassNames.add("Override");
@@ -272,10 +272,10 @@ public class ImportHandler {
 
     }
 
-    private Map<String,Set<String>> packageNames = new ConcurrentHashMap<>();
-    private Map<String,String> classNames = new ConcurrentHashMap<>();
-    private Map<String,Class<?>> clazzes = new ConcurrentHashMap<>();
-    private Map<String,Class<?>> statics = new ConcurrentHashMap<>();
+    private Map<String, Set<String>> packageNames = new ConcurrentHashMap<>();
+    private Map<String, String> classNames = new ConcurrentHashMap<>();
+    private Map<String, Class<?>> clazzes = new ConcurrentHashMap<>();
+    private Map<String, Class<?>> statics = new ConcurrentHashMap<>();
 
 
     public ImportHandler() {
@@ -287,8 +287,7 @@ public class ImportHandler {
         int lastPeriod = name.lastIndexOf('.');
 
         if (lastPeriod < 0) {
-            throw new ELException(Util.message(
-                    null, "importHandler.invalidStaticName", name));
+            throw new ELException(Util.message(null, "importHandler.invalidStaticName", name));
         }
 
         String className = name.substring(0, lastPeriod);
@@ -297,9 +296,7 @@ public class ImportHandler {
         Class<?> clazz = findClass(className, true);
 
         if (clazz == null) {
-            throw new ELException(Util.message(
-                    null, "importHandler.invalidClassNameForStatic",
-                    className, name));
+            throw new ELException(Util.message(null, "importHandler.invalidClassNameForStatic", className, name));
         }
 
         boolean found = false;
@@ -307,8 +304,7 @@ public class ImportHandler {
         for (Field field : clazz.getFields()) {
             if (field.getName().equals(fieldOrMethodName)) {
                 int modifiers = field.getModifiers();
-                if (Modifier.isStatic(modifiers) &&
-                        Modifier.isPublic(modifiers)) {
+                if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)) {
                     found = true;
                     break;
                 }
@@ -319,8 +315,7 @@ public class ImportHandler {
             for (Method method : clazz.getMethods()) {
                 if (method.getName().equals(fieldOrMethodName)) {
                     int modifiers = method.getModifiers();
-                    if (Modifier.isStatic(modifiers) &&
-                            Modifier.isPublic(modifiers)) {
+                    if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)) {
                         found = true;
                         break;
                     }
@@ -329,16 +324,14 @@ public class ImportHandler {
         }
 
         if (!found) {
-            throw new ELException(Util.message(null,
-                    "importHandler.staticNotFound", fieldOrMethodName,
-                    className, name));
+            throw new ELException(
+                    Util.message(null, "importHandler.staticNotFound", fieldOrMethodName, className, name));
         }
 
         Class<?> conflict = statics.get(fieldOrMethodName);
         if (conflict != null) {
-            throw new ELException(Util.message(null,
-                    "importHandler.ambiguousStaticImport", name,
-                    conflict.getName() + '.' +  fieldOrMethodName));
+            throw new ELException(Util.message(null, "importHandler.ambiguousStaticImport", name,
+                    conflict.getName() + '.' + fieldOrMethodName));
         }
 
         statics.put(fieldOrMethodName, clazz);
@@ -349,8 +342,7 @@ public class ImportHandler {
         int lastPeriodIndex = name.lastIndexOf('.');
 
         if (lastPeriodIndex < 0) {
-            throw new ELException(Util.message(
-                    null, "importHandler.invalidClassName", name));
+            throw new ELException(Util.message(null, "importHandler.invalidClassName", name));
         }
 
         String unqualifiedName = name.substring(lastPeriodIndex + 1);
@@ -358,8 +350,7 @@ public class ImportHandler {
 
         if (currentName != null && !currentName.equals(name)) {
             // Conflict. Same unqualifiedName, different fully qualified names
-            throw new ELException(Util.message(null,
-                    "importHandler.ambiguousImport", name, currentName));
+            throw new ELException(Util.message(null, "importHandler.ambiguousImport", name, currentName));
         }
     }
 
@@ -407,7 +398,7 @@ public class ImportHandler {
 
         // Search the package imports - note there may be multiple matches
         // (which correctly triggers an error)
-        for (Map.Entry<String,Set<String>> entry : packageNames.entrySet()) {
+        for (Map.Entry<String, Set<String>> entry : packageNames.entrySet()) {
             if (!entry.getValue().isEmpty()) {
                 // Standard package where we know all the class names
                 if (!entry.getValue().contains(name)) {
@@ -421,9 +412,8 @@ public class ImportHandler {
             Class<?> clazz = findClass(className, false);
             if (clazz != null) {
                 if (result != null) {
-                    throw new ELException(Util.message(null,
-                            "importHandler.ambiguousImport", className,
-                            result.getName()));
+                    throw new ELException(
+                            Util.message(null, "importHandler.ambiguousImport", className, result.getName()));
                 }
                 result = clazz;
             }
@@ -457,11 +447,10 @@ public class ImportHandler {
         // Class must be public, non-abstract, not an interface and in an
         // exported package
         int modifiers = clazz.getModifiers();
-        if (!Modifier.isPublic(modifiers) || Modifier.isAbstract(modifiers) ||
-                Modifier.isInterface(modifiers) || !isExported(clazz)) {
+        if (!Modifier.isPublic(modifiers) || Modifier.isAbstract(modifiers) || Modifier.isInterface(modifiers) ||
+                !isExported(clazz)) {
             if (throwException) {
-                throw new ELException(Util.message(
-                        null, "importHandler.invalidClass", name));
+                throw new ELException(Util.message(null, "importHandler.invalidClass", name));
             } else {
                 return null;
             }
@@ -479,8 +468,7 @@ public class ImportHandler {
 
 
     /*
-     * Marker class used because null values are not permitted in a
-     * ConcurrentHashMap.
+     * Marker class used because null values are not permitted in a ConcurrentHashMap.
      */
     private static class NotFound {
     }
diff --git a/java/jakarta/el/LambdaExpression.java b/java/jakarta/el/LambdaExpression.java
index b12c509ed1..899eacf2f4 100644
--- a/java/jakarta/el/LambdaExpression.java
+++ b/java/jakarta/el/LambdaExpression.java
@@ -25,11 +25,10 @@ public class LambdaExpression {
 
     private final List<String> formalParameters;
     private final ValueExpression expression;
-    private final Map<String,Object> nestedArguments = new HashMap<>();
+    private final Map<String, Object> nestedArguments = new HashMap<>();
     private ELContext context = null;
 
-    public LambdaExpression(List<String> formalParameters,
-            ValueExpression expression) {
+    public LambdaExpression(List<String> formalParameters, ValueExpression expression) {
         this.formalParameters = formalParameters;
         this.expression = expression;
 
@@ -40,8 +39,7 @@ public class LambdaExpression {
     }
 
     @SuppressWarnings("null") // args[i] can't be null due to earlier checks
-    public Object invoke(ELContext context, Object... args)
-            throws ELException {
+    public Object invoke(ELContext context, Object... args) throws ELException {
 
         Objects.requireNonNull(context);
 
@@ -56,9 +54,7 @@ public class LambdaExpression {
         }
 
         if (formalParamCount > argCount) {
-            throw new ELException(Util.message(context,
-                    "lambdaExpression.tooFewArgs",
-                    Integer.valueOf(argCount),
+            throw new ELException(Util.message(context, "lambdaExpression.tooFewArgs", Integer.valueOf(argCount),
                     Integer.valueOf(formalParamCount)));
         }
 
@@ -77,8 +73,7 @@ public class LambdaExpression {
             // Make arguments from this expression available to any nested
             // expression
             if (result instanceof LambdaExpression) {
-                ((LambdaExpression) result).nestedArguments.putAll(
-                        lambdaArguments);
+                ((LambdaExpression) result).nestedArguments.putAll(lambdaArguments);
             }
             return result;
         } finally {
@@ -87,6 +82,6 @@ public class LambdaExpression {
     }
 
     public java.lang.Object invoke(Object... args) {
-        return invoke (context, args);
+        return invoke(context, args);
     }
 }
diff --git a/java/jakarta/el/ListELResolver.java b/java/jakarta/el/ListELResolver.java
index f0fcc86da7..6cbcab7b85 100644
--- a/java/jakarta/el/ListELResolver.java
+++ b/java/jakarta/el/ListELResolver.java
@@ -26,7 +26,7 @@ public class ListELResolver extends ELResolver {
     private final boolean readOnly;
 
     // TODO - Handle the Lists created by List.of(). Multiple package private
-    //        classes. Java 9 + so a back-port would require JreCompat.
+    // classes. Java 9 + so a back-port would require JreCompat.
     private static final Class<?> UNMODIFIABLE = Collections.unmodifiableList(new ArrayList<>()).getClass();
 
     public ListELResolver() {
@@ -46,13 +46,11 @@ public class ListELResolver extends ELResolver {
             List<?> list = (List<?>) base;
             int idx = coerce(property);
             if (idx < 0 || idx >= list.size()) {
-                throw new PropertyNotFoundException(
-                        new ArrayIndexOutOfBoundsException(idx).getMessage());
+                throw new PropertyNotFoundException(new ArrayIndexOutOfBoundsException(idx).getMessage());
             }
 
             /*
-             * Not perfect as a custom list implementation may be read-only but
-             * consistent with isReadOnly().
+             * Not perfect as a custom list implementation may be read-only but consistent with isReadOnly().
              */
             if (list.getClass() == UNMODIFIABLE || readOnly) {
                 return null;
@@ -82,8 +80,7 @@ public class ListELResolver extends ELResolver {
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         Objects.requireNonNull(context);
 
         if (base instanceof List<?>) {
@@ -92,8 +89,8 @@ public class ListELResolver extends ELResolver {
             List<Object> list = (List<Object>) base;
 
             if (this.readOnly) {
-                throw new PropertyNotWritableException(Util.message(context,
-                        "resolverNotWritable", base.getClass().getName()));
+                throw new PropertyNotWritableException(
+                        Util.message(context, "resolverNotWritable", base.getClass().getName()));
             }
 
             int idx = coerce(property);
@@ -117,9 +114,7 @@ public class ListELResolver extends ELResolver {
             try {
                 int idx = coerce(property);
                 if (idx < 0 || idx >= list.size()) {
-                    throw new PropertyNotFoundException(
-                            new ArrayIndexOutOfBoundsException(idx)
-                                    .getMessage());
+                    throw new PropertyNotFoundException(new ArrayIndexOutOfBoundsException(idx).getMessage());
                 }
             } catch (IllegalArgumentException e) {
                 // ignore
@@ -151,7 +146,6 @@ public class ListELResolver extends ELResolver {
         if (property instanceof String) {
             return Integer.parseInt((String) property);
         }
-        throw new IllegalArgumentException(property != null ?
-                property.toString() : "null");
+        throw new IllegalArgumentException(property != null ? property.toString() : "null");
     }
 }
diff --git a/java/jakarta/el/MapELResolver.java b/java/jakarta/el/MapELResolver.java
index efca33f436..eea566ca88 100644
--- a/java/jakarta/el/MapELResolver.java
+++ b/java/jakarta/el/MapELResolver.java
@@ -23,8 +23,7 @@ import java.util.Objects;
 
 public class MapELResolver extends ELResolver {
 
-    private static final Class<?> UNMODIFIABLE =
-            Collections.unmodifiableMap(new HashMap<>()).getClass();
+    private static final Class<?> UNMODIFIABLE = Collections.unmodifiableMap(new HashMap<>()).getClass();
 
     private final boolean readOnly;
 
@@ -40,7 +39,7 @@ public class MapELResolver extends ELResolver {
     public Class<?> getType(ELContext context, Object base, Object property) {
         Objects.requireNonNull(context);
 
-        if (base instanceof Map<?,?>) {
+        if (base instanceof Map<?, ?>) {
             context.setPropertyResolved(base, property);
 
             Map<?, ?> map = (Map<?, ?>) base;
@@ -58,25 +57,24 @@ public class MapELResolver extends ELResolver {
     public Object getValue(ELContext context, Object base, Object property) {
         Objects.requireNonNull(context);
 
-        if (base instanceof Map<?,?>) {
+        if (base instanceof Map<?, ?>) {
             context.setPropertyResolved(base, property);
-            return ((Map<?,?>) base).get(property);
+            return ((Map<?, ?>) base).get(property);
         }
 
         return null;
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         Objects.requireNonNull(context);
 
         if (base instanceof Map<?, ?>) {
             context.setPropertyResolved(base, property);
 
             if (this.readOnly) {
-                throw new PropertyNotWritableException(Util.message(context,
-                        "resolverNotWritable", base.getClass().getName()));
+                throw new PropertyNotWritableException(
+                        Util.message(context, "resolverNotWritable", base.getClass().getName()));
             }
 
             try {
diff --git a/java/jakarta/el/MethodExpression.java b/java/jakarta/el/MethodExpression.java
index 2635960aa7..e8a91c4fb8 100644
--- a/java/jakarta/el/MethodExpression.java
+++ b/java/jakarta/el/MethodExpression.java
@@ -25,15 +25,11 @@ public abstract class MethodExpression extends Expression {
      *
      * @return Information about the method that this expression resolves to
      *
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If a property/variable resolution failed because no match
-     *              was found or a match was found but was not readable
-     * @throws MethodNotFoundException
-     *              If no matching method can be found
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving the property
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If a property/variable resolution failed because no match was found or a match
+     *                                       was found but was not readable
+     * @throws MethodNotFoundException   If no matching method can be found
+     * @throws ELException               Wraps any exception throw whilst resolving the property
      */
     public abstract MethodInfo getMethodInfo(ELContext context);
 
@@ -43,21 +39,18 @@ public abstract class MethodExpression extends Expression {
      *
      * @return The result of invoking this method expression
      *
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If a property/variable resolution failed because no match
-     *              was found or a match was found but was not readable
-     * @throws MethodNotFoundException
-     *              If no matching method can be found
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving the property or
-     *              coercion of the result to the expected return type fails
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If a property/variable resolution failed because no match was found or a match
+     *                                       was found but was not readable
+     * @throws MethodNotFoundException   If no matching method can be found
+     * @throws ELException               Wraps any exception throw whilst resolving the property or coercion of the
+     *                                       result to the expected return type fails
      */
     public abstract Object invoke(ELContext context, Object[] params);
 
     /**
      * @return This default implementation always returns <code>false</code>
+     *
      * @since EL 3.0
      */
     public boolean isParametersProvided() {
@@ -66,22 +59,17 @@ public abstract class MethodExpression extends Expression {
     }
 
     /**
-     * Obtain the {@link MethodReference} for the method to which this method
-     * expression resolves.
+     * Obtain the {@link MethodReference} for the method to which this method expression resolves.
      *
      * @param context The EL context for this evaluation
      *
      * @return This default implementation always returns <code>null</code>
      *
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If a property/variable resolution failed because no match
-     *              was found or a match was found but was not readable
-     * @throws MethodNotFoundException
-     *              If no matching method can be found
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving the property
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If a property/variable resolution failed because no match was found or a match
+     *                                       was found but was not readable
+     * @throws MethodNotFoundException   If no matching method can be found
+     * @throws ELException               Wraps any exception throw whilst resolving the property
      *
      * @since EL 5.0
      */
diff --git a/java/jakarta/el/MethodReference.java b/java/jakarta/el/MethodReference.java
index ed59a842d4..30065c5768 100644
--- a/java/jakarta/el/MethodReference.java
+++ b/java/jakarta/el/MethodReference.java
@@ -43,8 +43,7 @@ public class MethodReference {
     /**
      * Obtain the base object on which the method will be invoked.
      *
-     * @return The base object on which the method will be invoked or
-     *         {@code null} for literal method expressions.
+     * @return The base object on which the method will be invoked or {@code null} for literal method expressions.
      */
     public Object getBase() {
         return base;
@@ -52,11 +51,11 @@ public class MethodReference {
 
 
     /**
-     * Obtain the {@link MethodInfo} for the {@link MethodExpression} for which
-     * this {@link MethodReference} has been generated.
+     * Obtain the {@link MethodInfo} for the {@link MethodExpression} for which this {@link MethodReference} has been
+     * generated.
      *
-     * @return The {@link MethodInfo} for the {@link MethodExpression} for which
-     *         this {@link MethodReference} has been generated.
+     * @return The {@link MethodInfo} for the {@link MethodExpression} for which this {@link MethodReference} has been
+     *             generated.
      */
     public MethodInfo getMethodInfo() {
         return this.methodInfo;
@@ -64,12 +63,10 @@ public class MethodReference {
 
 
     /**
-     * Obtain the annotations on the method to which the associated expression
-     * resolves.
+     * Obtain the annotations on the method to which the associated expression resolves.
      *
-     * @return The annotations on the method to which the associated expression
-     *         resolves. If the are no annotations, then an empty array is
-     *         returned.
+     * @return The annotations on the method to which the associated expression resolves. If the are no annotations,
+     *             then an empty array is returned.
      */
     public Annotation[] getAnnotations() {
         return annotations;
@@ -77,10 +74,10 @@ public class MethodReference {
 
 
     /**
-     * Obtain the evaluated parameter values that will be passed to the method
-     * to which the associated expression resolves.
+     * Obtain the evaluated parameter values that will be passed to the method to which the associated expression
+     * resolves.
      *
-     *  @return The evaluated parameters.
+     * @return The evaluated parameters.
      */
     public Object[] getEvaluatedParameters() {
         return evaluatedParameters;
diff --git a/java/jakarta/el/ResourceBundleELResolver.java b/java/jakarta/el/ResourceBundleELResolver.java
index d0723b4484..62e9fd6729 100644
--- a/java/jakarta/el/ResourceBundleELResolver.java
+++ b/java/jakarta/el/ResourceBundleELResolver.java
@@ -35,8 +35,7 @@ public class ResourceBundleELResolver extends ELResolver {
 
             if (property != null) {
                 try {
-                    return ((ResourceBundle) base).getObject(property
-                            .toString());
+                    return ((ResourceBundle) base).getObject(property.toString());
                 } catch (MissingResourceException mre) {
                     return "???" + property.toString() + "???";
                 }
@@ -53,8 +52,7 @@ public class ResourceBundleELResolver extends ELResolver {
         if (base instanceof ResourceBundle) {
             context.setPropertyResolved(base, property);
             /*
-             * ResourceBundles are always read-only so fall-through to return
-             * null
+             * ResourceBundles are always read-only so fall-through to return null
              */
         }
 
@@ -62,14 +60,13 @@ public class ResourceBundleELResolver extends ELResolver {
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         Objects.requireNonNull(context);
 
         if (base instanceof ResourceBundle) {
             context.setPropertyResolved(base, property);
-            throw new PropertyNotWritableException(Util.message(context,
-                    "resolverNotWritable", base.getClass().getName()));
+            throw new PropertyNotWritableException(
+                    Util.message(context, "resolverNotWritable", base.getClass().getName()));
         }
     }
 
diff --git a/java/jakarta/el/StandardELContext.java b/java/jakarta/el/StandardELContext.java
index 9f04060ac0..092d439f40 100644
--- a/java/jakarta/el/StandardELContext.java
+++ b/java/jakarta/el/StandardELContext.java
@@ -30,22 +30,20 @@ public class StandardELContext extends ELContext {
     private final FunctionMapper functionMapper;
     private final CompositeELResolver standardResolver;
     private final CompositeELResolver customResolvers;
-    private final Map<String,Object> localBeans = new HashMap<>();
+    private final Map<String, Object> localBeans = new HashMap<>();
 
 
     public StandardELContext(ExpressionFactory factory) {
         wrappedContext = null;
         variableMapper = new StandardVariableMapper();
-        functionMapper =
-                new StandardFunctionMapper(factory.getInitFunctionMap());
+        functionMapper = new StandardFunctionMapper(factory.getInitFunctionMap());
         standardResolver = new CompositeELResolver();
         customResolvers = new CompositeELResolver();
 
         ELResolver streamResolver = factory.getStreamELResolver();
 
         // Add resolvers in order
-        standardResolver.add(new BeanNameELResolver(
-                new StandardBeanNameResolver(localBeans)));
+        standardResolver.add(new BeanNameELResolver(new StandardBeanNameResolver(localBeans)));
         standardResolver.add(customResolvers);
         if (streamResolver != null) {
             standardResolver.add(streamResolver);
@@ -66,8 +64,7 @@ public class StandardELContext extends ELContext {
         customResolvers = new CompositeELResolver();
 
         // Add resolvers in order
-        standardResolver.add(new BeanNameELResolver(
-                new StandardBeanNameResolver(localBeans)));
+        standardResolver.add(new BeanNameELResolver(new StandardBeanNameResolver(localBeans)));
         standardResolver.add(customResolvers);
         // Use resolvers from context from this point on
         standardResolver.add(context.getELResolver());
@@ -111,7 +108,7 @@ public class StandardELContext extends ELContext {
     }
 
 
-    Map<String,Object> getLocalBeans() {
+    Map<String, Object> getLocalBeans() {
         return localBeans;
     }
 
@@ -129,8 +126,7 @@ public class StandardELContext extends ELContext {
         }
 
         @Override
-        public ValueExpression setVariable(String variable,
-                ValueExpression expression) {
+        public ValueExpression setVariable(String variable, ValueExpression expression) {
             if (vars == null) {
                 vars = new HashMap<>();
             }
@@ -145,9 +141,9 @@ public class StandardELContext extends ELContext {
 
     private static class StandardBeanNameResolver extends BeanNameResolver {
 
-        private final Map<String,Object> beans;
+        private final Map<String, Object> beans;
 
-        StandardBeanNameResolver(Map<String,Object> beans) {
+        StandardBeanNameResolver(Map<String, Object> beans) {
             this.beans = beans;
         }
 
@@ -162,8 +158,7 @@ public class StandardELContext extends ELContext {
         }
 
         @Override
-        public void setBeanValue(String beanName, Object value)
-                throws PropertyNotWritableException {
+        public void setBeanValue(String beanName, Object value) throws PropertyNotWritableException {
             beans.put(beanName, value);
         }
 
@@ -181,9 +176,9 @@ public class StandardELContext extends ELContext {
 
     private static class StandardFunctionMapper extends FunctionMapper {
 
-        private final Map<String,Method> methods = new HashMap<>();
+        private final Map<String, Method> methods = new HashMap<>();
 
-        StandardFunctionMapper(Map<String,Method> initFunctionMap) {
+        StandardFunctionMapper(Map<String, Method> initFunctionMap) {
             if (initFunctionMap != null) {
                 methods.putAll(initFunctionMap);
             }
@@ -196,8 +191,7 @@ public class StandardELContext extends ELContext {
         }
 
         @Override
-        public void mapFunction(String prefix, String localName,
-                Method method) {
+        public void mapFunction(String prefix, String localName, Method method) {
             String key = prefix + ':' + localName;
             if (method == null) {
                 methods.remove(key);
diff --git a/java/jakarta/el/StaticFieldELResolver.java b/java/jakarta/el/StaticFieldELResolver.java
index e29c7a8557..0e7d8a48b5 100644
--- a/java/jakarta/el/StaticFieldELResolver.java
+++ b/java/jakarta/el/StaticFieldELResolver.java
@@ -41,17 +41,13 @@ public class StaticFieldELResolver extends ELResolver {
             try {
                 Field field = clazz.getField(name);
                 int modifiers = field.getModifiers();
-                if (Modifier.isStatic(modifiers) &&
-                        Modifier.isPublic(modifiers) &&
-                        Util.canAccess(null, field)) {
+                if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers) && Util.canAccess(null, field)) {
                     return field.get(null);
                 }
-            } catch (IllegalArgumentException | IllegalAccessException |
-                    NoSuchFieldException | SecurityException e) {
+            } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
                 exception = e;
             }
-            String msg = Util.message(context, "staticFieldELResolver.notFound",
-                    name, clazz.getName());
+            String msg = Util.message(context, "staticFieldELResolver.notFound", name, clazz.getName());
             if (exception == null) {
                 throw new PropertyNotFoundException(msg);
             } else {
@@ -63,24 +59,21 @@ public class StaticFieldELResolver extends ELResolver {
 
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         Objects.requireNonNull(context);
 
         if (base instanceof ELClass && property instanceof String) {
             Class<?> clazz = ((ELClass) base).getKlass();
             String name = (String) property;
 
-            throw new PropertyNotWritableException(Util.message(context,
-                    "staticFieldELResolver.notWritable", name,
-                    clazz.getName()));
+            throw new PropertyNotWritableException(
+                    Util.message(context, "staticFieldELResolver.notWritable", name, clazz.getName()));
         }
     }
 
 
     @Override
-    public Object invoke(ELContext context, Object base, Object method,
-            Class<?>[] paramTypes, Object[] params) {
+    public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
         Objects.requireNonNull(context);
 
         if (base instanceof ELClass && method instanceof String) {
@@ -92,8 +85,8 @@ public class StaticFieldELResolver extends ELResolver {
             if ("<init>".equals(methodName)) {
                 Constructor<?> match = Util.findConstructor(context, clazz, paramTypes, params);
 
-                Object[] parameters = Util.buildParameters(
-                        context, match.getParameterTypes(), match.isVarArgs(), params);
+                Object[] parameters = Util.buildParameters(context, match.getParameterTypes(), match.isVarArgs(),
+                        params);
 
                 Object result = null;
 
@@ -113,13 +106,12 @@ public class StaticFieldELResolver extends ELResolver {
                 Method match = Util.findMethod(context, clazz, null, methodName, paramTypes, params);
 
                 if (match == null) {
-                    throw new MethodNotFoundException(Util.message(context,
-                            "staticFieldELResolver.methodNotFound", methodName,
-                            clazz.getName()));
+                    throw new MethodNotFoundException(
+                            Util.message(context, "staticFieldELResolver.methodNotFound", methodName, clazz.getName()));
                 }
 
-                Object[] parameters = Util.buildParameters(
-                        context, match.getParameterTypes(), match.isVarArgs(), params);
+                Object[] parameters = Util.buildParameters(context, match.getParameterTypes(), match.isVarArgs(),
+                        params);
 
                 Object result = null;
                 try {
@@ -150,18 +142,14 @@ public class StaticFieldELResolver extends ELResolver {
             try {
                 Field field = clazz.getField(name);
                 int modifiers = field.getModifiers();
-                if (Modifier.isStatic(modifiers) &&
-                        Modifier.isPublic(modifiers) &&
-                        Util.canAccess(null, field)) {
+                if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers) && Util.canAccess(null, field)) {
                     // Resolver is read-only so returns null for resolved fields
                     return null;
                 }
-            } catch (IllegalArgumentException | NoSuchFieldException |
-                    SecurityException e) {
+            } catch (IllegalArgumentException | NoSuchFieldException | SecurityException e) {
                 exception = e;
             }
-            String msg = Util.message(context, "staticFieldELResolver.notFound",
-                    name, clazz.getName());
+            String msg = Util.message(context, "staticFieldELResolver.notFound", name, clazz.getName());
             if (exception == null) {
                 throw new PropertyNotFoundException(msg);
             } else {
diff --git a/java/jakarta/el/TypeConverter.java b/java/jakarta/el/TypeConverter.java
index 0804882f9d..532543d3da 100644
--- a/java/jakarta/el/TypeConverter.java
+++ b/java/jakarta/el/TypeConverter.java
@@ -32,8 +32,7 @@ public abstract class TypeConverter extends ELResolver {
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, Object value) {
         // NO-OP
     }
 
diff --git a/java/jakarta/el/Util.java b/java/jakarta/el/Util.java
index 6a9f313c80..0fa4637105 100644
--- a/java/jakarta/el/Util.java
+++ b/java/jakarta/el/Util.java
@@ -42,8 +42,8 @@ class Util {
     private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
 
     /**
-     * Checks whether the supplied Throwable is one that needs to be
-     * rethrown and swallows all others.
+     * Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others.
+     *
      * @param t the Throwable to check
      */
     static void handleThrowable(Throwable t) {
@@ -68,8 +68,7 @@ class Util {
                 return "";
             }
         }
-        ResourceBundle bundle = ResourceBundle.getBundle(
-                "jakarta.el.LocalStrings", locale);
+        ResourceBundle bundle = ResourceBundle.getBundle("jakarta.el.LocalStrings", locale);
         try {
             String template = bundle.getString(name);
             if (props != null) {
@@ -86,8 +85,8 @@ class Util {
     private static final Map<CacheKey, CacheValue> factoryCache = new ConcurrentHashMap<>();
 
     /**
-     * Provides a per class loader cache of ExpressionFactory instances without
-     * pinning any in memory as that could trigger a memory leak.
+     * Provides a per class loader cache of ExpressionFactory instances without pinning any in memory as that could
+     * trigger a memory leak.
      */
     static ExpressionFactory getExpressionFactory() {
 
@@ -137,9 +136,8 @@ class Util {
 
 
     /**
-     * Key used to cache default ExpressionFactory information per class
-     * loader. The class loader reference is never {@code null}, because
-     * {@code null} tccl is handled separately.
+     * Key used to cache default ExpressionFactory information per class loader. The class loader reference is never
+     * {@code null}, because {@code null} tccl is handled separately.
      */
     private static class CacheKey {
         private final int hash;
@@ -193,16 +191,14 @@ class Util {
 
 
     /*
-     * This method duplicates code in org.apache.el.util.ReflectionUtil. When
-     * making changes keep the code in sync.
+     * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
      */
-    static Method findMethod(ELContext context, Class<?> clazz, Object base, String methodName,
-            Class<?>[] paramTypes, Object[] paramValues) {
+    static Method findMethod(ELContext context, Class<?> clazz, Object base, String methodName, Class<?>[] paramTypes,
+            Object[] paramValues) {
 
         if (clazz == null || methodName == null) {
             throw new MethodNotFoundException(
-                    message(null, "util.method.notfound", clazz, methodName,
-                    paramString(paramTypes)));
+                    message(null, "util.method.notfound", clazz, methodName, paramString(paramTypes)));
         }
 
         if (paramTypes == null) {
@@ -219,14 +215,13 @@ class Util {
     }
 
     /*
-     * This method duplicates code in org.apache.el.util.ReflectionUtil. When
-     * making changes keep the code in sync.
+     * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
      */
     @SuppressWarnings("null")
-    private static <T> Wrapper<T> findWrapper(ELContext context, Class<?> clazz, List<Wrapper<T>> wrappers,
-            String name, Class<?>[] paramTypes, Object[] paramValues) {
+    private static <T> Wrapper<T> findWrapper(ELContext context, Class<?> clazz, List<Wrapper<T>> wrappers, String name,
+            Class<?>[] paramTypes, Object[] paramValues) {
 
-        Map<Wrapper<T>,MatchResult> candidates = new HashMap<>();
+        Map<Wrapper<T>, MatchResult> candidates = new HashMap<>();
 
         int paramCount = paramTypes.length;
 
@@ -245,17 +240,16 @@ class Util {
                 // Method has wrong number of parameters
                 continue;
             }
-            if (w.isVarArgs() && paramCount < mParamCount -1) {
+            if (w.isVarArgs() && paramCount < mParamCount - 1) {
                 // Method has wrong number of parameters
                 continue;
             }
-            if (w.isVarArgs() && paramCount == mParamCount && paramValues != null &&
-                    paramValues.length > paramCount && !paramTypes[mParamCount -1].isArray()) {
+            if (w.isVarArgs() && paramCount == mParamCount && paramValues != null && paramValues.length > paramCount &&
+                    !paramTypes[mParamCount - 1].isArray()) {
                 // Method arguments don't match
                 continue;
             }
-            if (w.isVarArgs() && paramCount > mParamCount && paramValues != null &&
-                    paramValues.length != paramCount) {
+            if (w.isVarArgs() && paramCount > mParamCount && paramValues != null && paramValues.length != paramCount) {
                 // Might match a different varargs method
                 continue;
             }
@@ -332,8 +326,8 @@ class Util {
                 return w;
             }
 
-            candidates.put(w, new MatchResult(
-                    w.isVarArgs(), exactMatch, assignableMatch, coercibleMatch, varArgsMatch, w.isBridge()));
+            candidates.put(w, new MatchResult(w.isVarArgs(), exactMatch, assignableMatch, coercibleMatch, varArgsMatch,
+                    w.isBridge()));
         }
 
         // Look for the method that has the highest number of parameters where
@@ -363,17 +357,15 @@ class Util {
             if (match == null) {
                 // If multiple methods have the same matching number of parameters
                 // the match is ambiguous so throw an exception
-                throw new MethodNotFoundException(message(
-                        null, "util.method.ambiguous", clazz, name,
-                        paramString(paramTypes)));
+                throw new MethodNotFoundException(
+                        message(null, "util.method.ambiguous", clazz, name, paramString(paramTypes)));
             }
         }
 
         // Handle case where no match at all was found
         if (match == null) {
-            throw new MethodNotFoundException(message(
-                        null, "util.method.notfound", clazz, name,
-                        paramString(paramTypes)));
+            throw new MethodNotFoundException(
+                    message(null, "util.method.notfound", clazz, name, paramString(paramTypes)));
         }
 
         return match;
@@ -400,11 +392,9 @@ class Util {
 
 
     /*
-     * This method duplicates code in org.apache.el.util.ReflectionUtil. When
-     * making changes keep the code in sync.
+     * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
      */
-    private static <T> Wrapper<T> resolveAmbiguousWrapper(Set<Wrapper<T>> candidates,
-            Class<?>[] paramTypes) {
+    private static <T> Wrapper<T> resolveAmbiguousWrapper(Set<Wrapper<T>> candidates, Class<?>[] paramTypes) {
         // Identify which parameter isn't an exact match
         Wrapper<T> w = candidates.iterator().next();
 
@@ -449,8 +439,7 @@ class Util {
         if (Number.class.isAssignableFrom(nonMatchClass)) {
             for (Wrapper<T> c : candidates) {
                 Class<?> candidateType = c.getParameterTypes()[nonMatchIndex];
-                if (Number.class.isAssignableFrom(candidateType) ||
-                        candidateType.isPrimitive()) {
+                if (Number.class.isAssignableFrom(candidateType) || candidateType.isPrimitive()) {
                     if (match == null) {
                         match = c;
                     } else {
@@ -467,8 +456,7 @@ class Util {
 
 
     /*
-     * This method duplicates code in org.apache.el.util.ReflectionUtil. When
-     * making changes keep the code in sync.
+     * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
      */
     static boolean isAssignableFrom(Class<?> src, Class<?> target) {
         // src will always be an object
@@ -505,12 +493,11 @@ class Util {
 
 
     /*
-     * This method duplicates code in org.apache.el.util.ReflectionUtil. When
-     * making changes keep the code in sync.
+     * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
      */
     private static boolean isCoercibleFrom(ELContext context, Object src, Class<?> target) {
         // TODO: This isn't pretty but it works. Significant refactoring would
-        //       be required to avoid the exception.
+        // be required to avoid the exception.
         try {
             context.convertToType(src, target);
         } catch (ELException e) {
@@ -538,13 +525,11 @@ class Util {
 
 
     /*
-     * This method duplicates code in org.apache.el.util.ReflectionUtil. When
-     * making changes keep the code in sync.
+     * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
      */
     static Method getMethod(Class<?> type, Object base, Method m) {
-        if (m == null ||
-                (Modifier.isPublic(type.getModifiers()) &&
-                        (Modifier.isStatic(m.getModifiers()) && canAccess(null, m) || canAccess(base, m)))) {
+        if (m == null || (Modifier.isPublic(type.getModifiers()) &&
+                (Modifier.isStatic(m.getModifiers()) && canAccess(null, m) || canAccess(base, m)))) {
             return m;
         }
         Class<?>[] interfaces = type.getInterfaces();
@@ -583,8 +568,7 @@ class Util {
 
         if (clazz == null) {
             throw new MethodNotFoundException(
-                    message(null, "util.method.notfound", null, methodName,
-                    paramString(paramTypes)));
+                    message(null, "util.method.notfound", null, methodName, paramString(paramTypes)));
         }
 
         if (paramTypes == null) {
@@ -600,9 +584,8 @@ class Util {
         Constructor<?> constructor = wrapper.unWrap();
 
         if (!Modifier.isPublic(clazz.getModifiers()) || !canAccess(null, constructor)) {
-            throw new MethodNotFoundException(message(
-                    null, "util.method.notfound", clazz, methodName,
-                    paramString(paramTypes)));
+            throw new MethodNotFoundException(
+                    message(null, "util.method.notfound", clazz, methodName, paramString(paramTypes)));
         }
 
         return constructor;
@@ -618,7 +601,7 @@ class Util {
     }
 
 
-    static Object[] buildParameters(ELContext context, Class<?>[] parameterTypes, boolean isVarArgs,Object[] params) {
+    static Object[] buildParameters(ELContext context, Class<?>[] parameterTypes, boolean isVarArgs, Object[] params) {
         Object[] parameters = null;
         if (parameterTypes.length > 0) {
             parameters = new Object[parameterTypes.length];
@@ -672,8 +655,11 @@ class Util {
         }
 
         public abstract T unWrap();
+
         public abstract Class<?>[] getParameterTypes();
+
         public abstract boolean isVarArgs();
+
         public abstract boolean isBridge();
     }
 
@@ -735,8 +721,7 @@ class Util {
     }
 
     /*
-     * This class duplicates code in org.apache.el.util.ReflectionUtil. When
-     * making changes keep the code in sync.
+     * This class duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
      */
     private static class MatchResult implements Comparable<MatchResult> {
 
@@ -810,14 +795,13 @@ class Util {
 
         @Override
         public boolean equals(Object o) {
-            return o == this || (null != o &&
-                    this.getClass().equals(o.getClass()) &&
-                    ((MatchResult)o).getExactCount() == this.getExactCount() &&
-                    ((MatchResult)o).getAssignableCount() == this.getAssignableCount() &&
-                    ((MatchResult)o).getCoercibleCount() == this.getCoercibleCount() &&
-                    ((MatchResult)o).getVarArgsCount() == this.getVarArgsCount() &&
-                    ((MatchResult)o).isVarArgs() == this.isVarArgs() &&
-                    ((MatchResult)o).isBridge() == this.isBridge());
+            return o == this || (null != o && this.getClass().equals(o.getClass()) &&
+                    ((MatchResult) o).getExactCount() == this.getExactCount() &&
+                    ((MatchResult) o).getAssignableCount() == this.getAssignableCount() &&
+                    ((MatchResult) o).getCoercibleCount() == this.getCoercibleCount() &&
+                    ((MatchResult) o).getVarArgsCount() == this.getVarArgsCount() &&
+                    ((MatchResult) o).isVarArgs() == this.isVarArgs() &&
+                    ((MatchResult) o).isBridge() == this.isBridge());
         }
 
         @Override
diff --git a/java/jakarta/el/ValueExpression.java b/java/jakarta/el/ValueExpression.java
index cbaba0c792..33b04eb906 100644
--- a/java/jakarta/el/ValueExpression.java
+++ b/java/jakarta/el/ValueExpression.java
@@ -21,56 +21,39 @@ public abstract class ValueExpression extends Expression {
     private static final long serialVersionUID = 8577809572381654673L;
 
     /**
-     * @param <T> The expected type for the result of evaluating this value
-     *            expression
+     * @param <T>     The expected type for the result of evaluating this value expression
      * @param context The EL context for this evaluation
      *
      * @return The result of evaluating this value expression
      *
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If a property/variable resolution failed because no match
-     *              was found or a match was found but was not readable
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving a property or
-     *              variable
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If a property/variable resolution failed because no match was found or a match
+     *                                       was found but was not readable
+     * @throws ELException               Wraps any exception throw whilst resolving a property or variable
      */
     public abstract <T> T getValue(ELContext context);
 
     /**
      * @param context The EL context for this evaluation
-     * @param value   The value to set the property to which this value
-     *                expression refers
+     * @param value   The value to set the property to which this value expression refers
      *
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If a property/variable resolution failed because no match
-     *              was found
-     * @throws PropertyNotWritableException
-     *              If a property/variable resolution failed because a match was
-     *              found but was not writable
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving a property or
-     *              variable
+     * @throws NullPointerException         If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException    If a property/variable resolution failed because no match was found
+     * @throws PropertyNotWritableException If a property/variable resolution failed because a match was found but was
+     *                                          not writable
+     * @throws ELException                  Wraps any exception throw whilst resolving a property or variable
      */
     public abstract void setValue(ELContext context, Object value);
 
     /**
      * @param context The EL context for this evaluation
      *
-     * @return <code>true</code> if this expression is read only otherwise
-     *         <code>false</code>
+     * @return <code>true</code> if this expression is read only otherwise <code>false</code>
      *
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If a property/variable resolution failed because no match
-     *              was found or a match was found but was not readable
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving a property or
-     *              variable
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If a property/variable resolution failed because no match was found or a match
+     *                                       was found but was not readable
+     * @throws ELException               Wraps any exception throw whilst resolving a property or variable
      */
     public abstract boolean isReadOnly(ELContext context);
 
@@ -79,14 +62,10 @@ public abstract class ValueExpression extends Expression {
      *
      * @return The type of the result of this value expression
      *
-     * @throws NullPointerException
-     *              If the supplied context is <code>null</code>
-     * @throws PropertyNotFoundException
-     *              If a property/variable resolution failed because no match
-     *              was found or a match was found but was not readable
-     * @throws ELException
-     *              Wraps any exception throw whilst resolving a property or
-     *              variable
+     * @throws NullPointerException      If the supplied context is <code>null</code>
+     * @throws PropertyNotFoundException If a property/variable resolution failed because no match was found or a match
+     *                                       was found but was not readable
+     * @throws ELException               Wraps any exception throw whilst resolving a property or variable
      */
     public abstract Class<?> getType(ELContext context);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat] 03/06: A sub-set of JavaBeans support that does not depend on java.beans

Posted by Mark Thomas <ma...@apache.org>.
On 22/02/2023 19:26, markt@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> markt pushed a commit to branch main
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> commit 0d4b396392db0362a8f1bc6a80c4f60005114f09
> Author: Mark Thomas <ma...@apache.org>
> AuthorDate: Wed Feb 22 15:52:51 2023 +0000
> 
>      A sub-set of JavaBeans support that does not depend on java.beans
>      
>      This for use by Expression Language when the java.desktop module (which
>      is where the java.beans package resides) is not available.

Hi all,

This commit will likely benefit from further review.

The purpose of this commit is to provide EL with an alternative to the 
default JavaBeans spec implementation provided by the JVM if the 
java.desktop module is not present. This removes the dependency on 
java.desktop from the EL spec.

The good news is that if java.desktop module is not present, large parts 
of the JavaBean spec don't apply as the necessary classes are not 
available. The bad news is that there are a lot of potential edge cases. 
I have tried to cover these in the unit tests but I would not be 
surprised if I have missed some.

Any suggestions for additional tests for edge cases I have missed would 
be welcome. One thing to note, I intend to commit essentially the same 
set of changes to the Jakarta EL project to implement the same change there.

Looking forward to the feedback.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 03/06: A sub-set of JavaBeans support that does not depend on java.beans

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 0d4b396392db0362a8f1bc6a80c4f60005114f09
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 22 15:52:51 2023 +0000

    A sub-set of JavaBeans support that does not depend on java.beans
    
    This for use by Expression Language when the java.desktop module (which
    is where the java.beans package resides) is not available.
---
 java/jakarta/el/BeanELResolver.java            |  76 ++------
 java/jakarta/el/BeanSupport.java               |  55 ++++++
 java/jakarta/el/BeanSupportFull.java           |  99 ++++++++++
 java/jakarta/el/BeanSupportStandalone.java     | 217 ++++++++++++++++++++++
 test/jakarta/el/BeanSupportBaseTest.java       | 244 +++++++++++++++++++++++++
 test/jakarta/el/TestBeanSupportFull.java       |  29 +++
 test/jakarta/el/TestBeanSupportStandalone.java |  34 ++++
 webapps/docs/changelog.xml                     |  11 ++
 8 files changed, 709 insertions(+), 56 deletions(-)

diff --git a/java/jakarta/el/BeanELResolver.java b/java/jakarta/el/BeanELResolver.java
index 80d46e171f..c661730ec3 100644
--- a/java/jakarta/el/BeanELResolver.java
+++ b/java/jakarta/el/BeanELResolver.java
@@ -16,10 +16,6 @@
  */
 package jakarta.el;
 
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
@@ -180,47 +176,13 @@ public class BeanELResolver extends ELResolver {
         return null;
     }
 
-    static final class BeanProperties {
-        private final Map<String, BeanProperty> properties;
-
-        private final Class<?> type;
+    abstract static class BeanProperties {
+        protected final Map<String, BeanProperty> properties;
+        protected final Class<?> type;
 
         BeanProperties(Class<?> type) throws ELException {
             this.type = type;
             this.properties = new HashMap<>();
-            try {
-                BeanInfo info = Introspector.getBeanInfo(this.type);
-                PropertyDescriptor[] pds = info.getPropertyDescriptors();
-                for (PropertyDescriptor pd : pds) {
-                    this.properties.put(pd.getName(), new BeanProperty(type, pd));
-                }
-                /*
-                 * Populating from any interfaces causes default methods to be included.
-                 */
-                populateFromInterfaces(type);
-            } catch (IntrospectionException ie) {
-                throw new ELException(ie);
-            }
-        }
-
-        private void populateFromInterfaces(Class<?> aClass) throws IntrospectionException {
-            Class<?> interfaces[] = aClass.getInterfaces();
-            if (interfaces.length > 0) {
-                for (Class<?> ifs : interfaces) {
-                    BeanInfo info = Introspector.getBeanInfo(ifs);
-                    PropertyDescriptor[] pds = info.getPropertyDescriptors();
-                    for (PropertyDescriptor pd : pds) {
-                        if (!this.properties.containsKey(pd.getName())) {
-                            this.properties.put(pd.getName(), new BeanProperty(this.type, pd));
-                        }
-                    }
-                    populateFromInterfaces(ifs);
-                }
-            }
-            Class<?> superclass = aClass.getSuperclass();
-            if (superclass != null) {
-                populateFromInterfaces(superclass);
-            }
         }
 
         private BeanProperty get(ELContext ctx, String name) {
@@ -236,21 +198,18 @@ public class BeanELResolver extends ELResolver {
         }
     }
 
-    static final class BeanProperty {
+    abstract static class BeanProperty {
         private final Class<?> type;
 
         private final Class<?> owner;
 
-        private final PropertyDescriptor descriptor;
-
         private Method read;
 
         private Method write;
 
-        BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
+        BeanProperty(Class<?> owner, Class<?> type) {
             this.owner = owner;
-            this.descriptor = descriptor;
-            this.type = descriptor.getPropertyType();
+            this.type = type;
         }
 
         public Class<?> getPropertyType() {
@@ -258,16 +217,15 @@ public class BeanELResolver extends ELResolver {
         }
 
         public boolean isReadOnly(Object base) {
-            return this.write == null &&
-                    (null == (this.write = Util.getMethod(this.owner, base, descriptor.getWriteMethod())));
+            return this.write == null && (null == (this.write = Util.getMethod(this.owner, base, getWriteMethod())));
         }
 
         private Method write(ELContext ctx, Object base) {
             if (this.write == null) {
-                this.write = Util.getMethod(this.owner, base, descriptor.getWriteMethod());
+                this.write = Util.getMethod(this.owner, base, getWriteMethod());
                 if (this.write == null) {
-                    throw new PropertyNotWritableException(Util.message(ctx, "propertyNotWritable",
-                            new Object[] { owner.getName(), descriptor.getName() }));
+                    throw new PropertyNotWritableException(
+                            Util.message(ctx, "propertyNotWritable", new Object[] { owner.getName(), getName() }));
                 }
             }
             return this.write;
@@ -275,14 +233,20 @@ public class BeanELResolver extends ELResolver {
 
         private Method read(ELContext ctx, Object base) {
             if (this.read == null) {
-                this.read = Util.getMethod(this.owner, base, descriptor.getReadMethod());
+                this.read = Util.getMethod(this.owner, base, getReadMethod());
                 if (this.read == null) {
-                    throw new PropertyNotFoundException(Util.message(ctx, "propertyNotReadable",
-                            new Object[] { owner.getName(), descriptor.getName() }));
+                    throw new PropertyNotFoundException(
+                            Util.message(ctx, "propertyNotReadable", new Object[] { owner.getName(), getName() }));
                 }
             }
             return this.read;
         }
+
+        abstract Method getWriteMethod();
+
+        abstract Method getReadMethod();
+
+        abstract String getName();
     }
 
     private BeanProperty property(ELContext ctx, Object base, Object property) {
@@ -291,7 +255,7 @@ public class BeanELResolver extends ELResolver {
 
         BeanProperties props = this.cache.get(type.getName());
         if (props == null || type != props.getType()) {
-            props = new BeanProperties(type);
+            props = BeanSupport.getInstance().getBeanProperties(type);
             this.cache.put(type.getName(), props);
         }
 
diff --git a/java/jakarta/el/BeanSupport.java b/java/jakarta/el/BeanSupport.java
new file mode 100644
index 0000000000..fdd60e596e
--- /dev/null
+++ b/java/jakarta/el/BeanSupport.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.el;
+
+import jakarta.el.BeanELResolver.BeanProperties;
+
+/*
+ * Provides an abstraction so the BeanELResolver can obtain JavaBeans specification support via different
+ * implementations.
+ */
+abstract class BeanSupport {
+
+    private static final BeanSupport beanSupport;
+
+    static {
+        boolean useFull = !Boolean.getBoolean("jakarta.el.BeanSupport.useStandalone");
+
+        if (useFull) {
+            // If not explicitly configured to use standalone, use the full implementation unless it is not available.
+            try {
+                Class.forName("java.beans.BeanInfo");
+            } catch (Exception e) {
+                // Ignore: Expected if using modules and java.desktop module is not present
+                useFull = false;
+            }
+        }
+        if (useFull) {
+            // The full implementation provided by the java.beans package
+            beanSupport = new BeanSupportFull();
+        } else {
+            // The cut-down local implementation that does not depend on the java.beans package
+            beanSupport = new BeanSupportStandalone();
+        }
+    }
+
+    static BeanSupport getInstance() {
+        return beanSupport;
+    }
+
+    abstract BeanProperties getBeanProperties(Class<?> type);
+}
diff --git a/java/jakarta/el/BeanSupportFull.java b/java/jakarta/el/BeanSupportFull.java
new file mode 100644
index 0000000000..03770b56ab
--- /dev/null
+++ b/java/jakarta/el/BeanSupportFull.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.el;
+
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+
+import jakarta.el.BeanELResolver.BeanProperties;
+import jakarta.el.BeanELResolver.BeanProperty;
+
+class BeanSupportFull extends BeanSupport {
+
+    @Override
+    BeanProperties getBeanProperties(Class<?> type) {
+        return new BeanPropertiesFull(type);
+    }
+
+    static final class BeanPropertiesFull extends BeanProperties {
+
+        BeanPropertiesFull(Class<?> type) throws ELException {
+            super(type);
+            try {
+                BeanInfo info = Introspector.getBeanInfo(this.type);
+                PropertyDescriptor[] pds = info.getPropertyDescriptors();
+                for (PropertyDescriptor pd : pds) {
+                    this.properties.put(pd.getName(), new BeanPropertyFull(type, pd));
+                }
+                /*
+                 * Populating from any interfaces causes default methods to be included.
+                 */
+                populateFromInterfaces(type);
+            } catch (IntrospectionException ie) {
+                throw new ELException(ie);
+            }
+        }
+
+        private void populateFromInterfaces(Class<?> aClass) throws IntrospectionException {
+            Class<?> interfaces[] = aClass.getInterfaces();
+            if (interfaces.length > 0) {
+                for (Class<?> ifs : interfaces) {
+                    BeanInfo info = Introspector.getBeanInfo(ifs);
+                    PropertyDescriptor[] pds = info.getPropertyDescriptors();
+                    for (PropertyDescriptor pd : pds) {
+                        if (!this.properties.containsKey(pd.getName())) {
+                            this.properties.put(pd.getName(), new BeanPropertyFull(this.type, pd));
+                        }
+                    }
+                    populateFromInterfaces(ifs);
+                }
+            }
+            Class<?> superclass = aClass.getSuperclass();
+            if (superclass != null) {
+                populateFromInterfaces(superclass);
+            }
+        }
+    }
+
+    static final class BeanPropertyFull extends BeanProperty {
+
+        private final PropertyDescriptor descriptor;
+
+        BeanPropertyFull(Class<?> owner, PropertyDescriptor descriptor) {
+            super(owner, descriptor.getPropertyType());
+            this.descriptor = descriptor;
+        }
+
+        @Override
+        Method getWriteMethod() {
+            return descriptor.getWriteMethod();
+        }
+
+        @Override
+        Method getReadMethod() {
+            return descriptor.getReadMethod();
+        }
+
+        @Override
+        String getName() {
+            return descriptor.getName();
+        }
+    }
+}
diff --git a/java/jakarta/el/BeanSupportStandalone.java b/java/jakarta/el/BeanSupportStandalone.java
new file mode 100644
index 0000000000..a2531451d2
--- /dev/null
+++ b/java/jakarta/el/BeanSupportStandalone.java
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.el;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import jakarta.el.BeanELResolver.BeanProperties;
+import jakarta.el.BeanELResolver.BeanProperty;
+
+/*
+ * Implements those parts of the JavaBeans Specification that can be implemented without reference to the java.beans
+ * package.
+ */
+class BeanSupportStandalone extends BeanSupport {
+
+    @Override
+    BeanProperties getBeanProperties(Class<?> type) {
+        return new BeanPropertiesStandalone(type);
+    }
+
+
+    private static PropertyDescriptor[] getPropertyDescriptors(Class<?> type) {
+        Map<String, PropertyDescriptor> pds = new HashMap<>();
+        Method[] methods = type.getMethods();
+        for (Method method : methods) {
+            if (!Modifier.isStatic(method.getModifiers())) {
+                String methodName = method.getName();
+                if (methodName.startsWith("is")) {
+                    if (method.getParameterCount() == 0 && method.getReturnType() == boolean.class) {
+                        String propertyName = getPropertyName(methodName.substring(2));
+                        PropertyDescriptor pd = pds.computeIfAbsent(propertyName, k -> new PropertyDescriptor());
+                        pd.setName(propertyName);
+                        pd.setReadMethodIs(method);
+                    }
+                } else if (methodName.startsWith("get")) {
+                    if (method.getParameterCount() == 0) {
+                        String propertyName = getPropertyName(methodName.substring(3));
+                        PropertyDescriptor pd = pds.computeIfAbsent(propertyName, k -> new PropertyDescriptor());
+                        pd.setName(propertyName);
+                        pd.setReadMethod(method);
+                    }
+                } else if (methodName.startsWith("set")) {
+                    if (method.getParameterCount() == 1 && method.getReturnType() == void.class) {
+                        String propertyName = getPropertyName(methodName.substring(3));
+                        PropertyDescriptor pd = pds.computeIfAbsent(propertyName, k -> new PropertyDescriptor());
+                        pd.setName(propertyName);
+                        pd.addWriteMethod(method);
+                    }
+
+                }
+            }
+        }
+        return pds.values().toArray(new PropertyDescriptor[0]);
+    }
+
+
+    private static String getPropertyName(String input) {
+        if (input.length() == 0) {
+            return null;
+        }
+        if (!Character.isUpperCase(input.charAt(0))) {
+            return null;
+        }
+        if (input.length() > 1 && Character.isUpperCase(input.charAt(1))) {
+            return input;
+        }
+        char[] chars = input.toCharArray();
+        chars[0] = Character.toLowerCase(chars[0]);
+        return new String(chars);
+    }
+
+
+    private static class PropertyDescriptor {
+        private String name;
+        private boolean usesIs;
+        private Method readMethod;
+        private Method writeMethod;
+        private List<Method> writeMethods = new ArrayList<>();
+
+        String getName() {
+            return name;
+        }
+
+        void setName(String name) {
+            this.name = name;
+        }
+
+        Class<?> getType() {
+            if (readMethod == null) {
+                return getWriteMethod().getParameterTypes()[0];
+            }
+            return readMethod.getReturnType();
+        }
+
+        Method getReadMethod() {
+            return readMethod;
+        }
+
+        void setReadMethod(Method readMethod) {
+            if (usesIs) {
+                return;
+            }
+            this.readMethod = readMethod;
+        }
+
+        void setReadMethodIs(Method readMethod) {
+            this.readMethod = readMethod;
+            this.usesIs = true;
+        }
+
+        Method getWriteMethod() {
+            if (writeMethod == null) {
+                Class<?> type;
+                if (readMethod != null) {
+                    type = readMethod.getReturnType();
+                } else {
+                    type = writeMethods.get(0).getParameterTypes()[0];
+                }
+                for (Method candidate : writeMethods) {
+                    if (type.isAssignableFrom(candidate.getParameterTypes()[0])) {
+                        type = candidate.getParameterTypes()[0];
+                        this.writeMethod = candidate;
+                    }
+                }
+            }
+            return writeMethod;
+        }
+
+        void addWriteMethod(Method writeMethod) {
+            this.writeMethods.add(writeMethod);
+        }
+    }
+
+
+    static final class BeanPropertiesStandalone extends BeanProperties {
+
+        BeanPropertiesStandalone(Class<?> type) throws ELException {
+            super(type);
+            PropertyDescriptor[] pds = getPropertyDescriptors(this.type);
+            for (PropertyDescriptor pd : pds) {
+                this.properties.put(pd.getName(), new BeanPropertyStandalone(type, pd));
+            }
+            /*
+             * Populating from any interfaces causes default methods to be included.
+             */
+            populateFromInterfaces(type);
+        }
+
+        private void populateFromInterfaces(Class<?> aClass) {
+            Class<?> interfaces[] = aClass.getInterfaces();
+            if (interfaces.length > 0) {
+                for (Class<?> ifs : interfaces) {
+                    PropertyDescriptor[] pds = getPropertyDescriptors(type);
+                    for (PropertyDescriptor pd : pds) {
+                        if (!this.properties.containsKey(pd.getName())) {
+                            this.properties.put(pd.getName(), new BeanPropertyStandalone(this.type, pd));
+                        }
+                    }
+                    populateFromInterfaces(ifs);
+                }
+            }
+            Class<?> superclass = aClass.getSuperclass();
+            if (superclass != null) {
+                populateFromInterfaces(superclass);
+            }
+        }
+    }
+
+
+    static final class BeanPropertyStandalone extends BeanProperty {
+
+        private final String name;
+        private final Method readMethod;
+        private final Method writeMethod;
+
+        BeanPropertyStandalone(Class<?> owner, PropertyDescriptor pd) {
+            super(owner, pd.getType());
+            name = pd.getName();
+            readMethod = pd.getReadMethod();
+            writeMethod = pd.getWriteMethod();
+        }
+
+        @Override
+        String getName() {
+            return name;
+        }
+
+        @Override
+        Method getReadMethod() {
+            return readMethod;
+        }
+
+        @Override
+        Method getWriteMethod() {
+            return writeMethod;
+        }
+    }
+}
diff --git a/test/jakarta/el/BeanSupportBaseTest.java b/test/jakarta/el/BeanSupportBaseTest.java
new file mode 100644
index 0000000000..e594811052
--- /dev/null
+++ b/test/jakarta/el/BeanSupportBaseTest.java
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.el;
+
+import jakarta.el.BeanELResolver.BeanProperties;
+import jakarta.el.BeanELResolver.BeanProperty;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class BeanSupportBaseTest {
+
+    @Test
+    public void testSimpleBean() {
+        doTest(SimpleBean.class, "value", TypeA.class, TypeA.class, TypeA.class);
+    }
+
+    @Test
+    public void testInvalidIs01Bean() {
+        doTest(InvalidIs01Bean.class, "value", TypeA.class, TypeA.class, TypeA.class);
+    }
+
+    @Test
+    public void testInvalidIs02Bean() {
+        doTest(InvalidIs02Bean.class, "value", TypeA.class, null, TypeA.class);
+    }
+
+    @Test
+    public void testInvalidIs03Bean() {
+        doTest(InvalidIs03Bean.class, "value", TypeA.class, null, TypeA.class);
+    }
+
+    @Test
+    public void testReadOnlyBean() {
+        doTest(ReadOnlyBean.class, "value", TypeA.class, TypeA.class, null);
+    }
+
+    @Test
+    public void testWriteOnlyBean() {
+        doTest(WriteOnlyBean.class, "value", TypeA.class, null, TypeA.class);
+    }
+
+    @Test
+    public void testOverLoadedWithGetABean() {
+        doTest(OverLoadedWithGetABean.class, "value", TypeA.class, TypeA.class, TypeAAA.class);
+    }
+
+    @Test
+    public void testOverLoadedWithGetAABean() {
+        doTest(OverLoadedWithGetAABean.class, "value", TypeAA.class, TypeAA.class, TypeAAA.class);
+    }
+
+    @Test
+    public void testOverLoadedWithGetAAABean() {
+        doTest(OverLoadedWithGetAAABean.class, "value", TypeAAA.class, TypeAAA.class, TypeAAA.class);
+    }
+
+    @Test
+    public void testMismatchBean() {
+        doTest(MismatchBean.class, "value", TypeA.class, TypeA.class, null);
+    }
+
+    /*
+     * The first setter found "wins".
+     */
+    @Test
+    public void testAmbiguousBean() {
+        doTest(AmbiguousBean.class, "value", TypeA.class, null, TypeA.class);
+    }
+
+
+    private void doTest(Class<?> clazz, String propertyName, Class<?> type, Class<?> typeGet, Class<?> typeSet) {
+        BeanProperties beanProperties = BeanSupport.getInstance().getBeanProperties(clazz);
+        BeanProperty beanProperty = beanProperties.properties.get(propertyName);
+
+        Assert.assertNotNull(beanProperty);
+        Assert.assertEquals(type, beanProperty.getPropertyType());
+
+        if (typeGet == null) {
+            Assert.assertNull(beanProperty.getReadMethod());
+        } else {
+            Assert.assertEquals(0, beanProperty.getReadMethod().getParameterCount());
+            Assert.assertEquals(typeGet, beanProperty.getReadMethod().getReturnType());
+        }
+
+        if (typeSet == null) {
+            Assert.assertNull(beanProperty.getWriteMethod());
+        } else {
+            Assert.assertEquals(void.class, beanProperty.getWriteMethod().getReturnType());
+            Assert.assertEquals(1, beanProperty.getWriteMethod().getParameterCount());
+            Assert.assertEquals(typeSet, beanProperty.getWriteMethod().getParameterTypes()[0]);
+        }
+    }
+
+
+    public static class SimpleBean {
+        public TypeA getValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+    }
+
+
+    public static class InvalidIs01Bean {
+        public TypeA isValue() {
+            return null;
+        }
+
+        public TypeA getValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+    }
+
+
+    public static class InvalidIs02Bean {
+        public TypeA isValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+    }
+
+
+    public static class InvalidIs03Bean {
+        public Boolean isValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+    }
+
+
+    public static class ReadOnlyBean {
+        public TypeA getValue() {
+            return null;
+        }
+    }
+
+
+    public static class WriteOnlyBean {
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+    }
+
+
+    public static class OverLoadedWithGetABean {
+        public TypeA getValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeAA value) {
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeAAA value) {
+        }
+    }
+
+
+    public static class OverLoadedWithGetAABean {
+        public TypeAA getValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeAA value) {
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeAAA value) {
+        }
+    }
+
+
+    public static class OverLoadedWithGetAAABean {
+        public TypeAAA getValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeAA value) {
+        }
+
+        public void setValue(@SuppressWarnings("unused") TypeAAA value) {
+        }
+    }
+
+
+    public static class MismatchBean {
+        public TypeA getValue() {
+            return null;
+        }
+
+        public void setValue(@SuppressWarnings("unused") String value) {
+        }
+    }
+
+
+    public static class AmbiguousBean {
+        public void setValue(@SuppressWarnings("unused") TypeA value) {
+        }
+
+        public void setValue(@SuppressWarnings("unused") String value) {
+        }
+    }
+
+
+    public static class TypeA {
+    }
+
+
+    public static class TypeAA extends TypeA {
+    }
+
+
+    public static class TypeAAA extends TypeAA {
+    }
+}
diff --git a/test/jakarta/el/TestBeanSupportFull.java b/test/jakarta/el/TestBeanSupportFull.java
new file mode 100644
index 0000000000..e8a5d1323c
--- /dev/null
+++ b/test/jakarta/el/TestBeanSupportFull.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.el;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestBeanSupportFull extends BeanSupportBaseTest {
+
+    @Test
+    public void testImplementationClass() {
+        Assert.assertTrue(BeanSupport.getInstance() instanceof BeanSupportFull);
+    }
+
+}
diff --git a/test/jakarta/el/TestBeanSupportStandalone.java b/test/jakarta/el/TestBeanSupportStandalone.java
new file mode 100644
index 0000000000..ebb97a9158
--- /dev/null
+++ b/test/jakarta/el/TestBeanSupportStandalone.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.el;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestBeanSupportStandalone extends BeanSupportBaseTest {
+
+    @Before
+    public void setup() {
+        System.setProperty("jakarta.el.BeanSupport.useStandalone", "true");
+    }
+
+    @Test
+    public void testImplementationClass() {
+        Assert.assertTrue(BeanSupport.getInstance() instanceof BeanSupportStandalone);
+    }
+}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a09b12dde9..176b104c6c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -114,6 +114,17 @@
       </update>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <add>
+        Provide an implementation of the sub-set of JavaBeans support that does
+        not depend on the <code>java.beans</code> package. This for use by
+        Expression Language when the <code>java.desktop</code> module (which is
+        where the <code>java.beans</code> package resides) is not available.
+        (markt)
+      </add>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 11.0.0-M3 (markt)" rtext="release in progress">
   <subsection name="General">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 05/06: Use base class so all BeanSupport implementations are tested

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 068052a9bfccd45c1af8bee5660eb66485662643
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 22 17:13:23 2023 +0000

    Use base class so all BeanSupport implementations are tested
---
 test/jakarta/el/TestBeanELResolver.java                 | 2 +-
 test/jakarta/el/TestELProcessor.java                    | 2 +-
 test/jakarta/el/TestEvaluationListener.java             | 2 +-
 test/org/apache/el/TestMethodExpressionImpl.java        | 3 ++-
 test/org/apache/el/TestValueExpressionImpl.java         | 3 ++-
 test/org/apache/el/parser/TestAstAssign.java            | 3 ++-
 test/org/apache/el/parser/TestELParser.java             | 3 ++-
 test/org/apache/el/stream/TestCollectionOperations.java | 3 ++-
 8 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/test/jakarta/el/TestBeanELResolver.java b/test/jakarta/el/TestBeanELResolver.java
index be0b706ccc..b35571e4df 100644
--- a/test/jakarta/el/TestBeanELResolver.java
+++ b/test/jakarta/el/TestBeanELResolver.java
@@ -26,7 +26,7 @@ import org.junit.Test;
 
 import org.apache.jasper.el.ELContextImpl;
 
-public class TestBeanELResolver {
+public class TestBeanELResolver extends ELBaseTest {
 
     private static final String METHOD01_NAME = "toString";
     private static final String METHOD02_NAME = "<init>";
diff --git a/test/jakarta/el/TestELProcessor.java b/test/jakarta/el/TestELProcessor.java
index 1dd04c090a..b994221708 100644
--- a/test/jakarta/el/TestELProcessor.java
+++ b/test/jakarta/el/TestELProcessor.java
@@ -19,7 +19,7 @@ package jakarta.el;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class TestELProcessor {
+public class TestELProcessor extends ELBaseTest {
 
     @Test
     public void testDefineBean01() {
diff --git a/test/jakarta/el/TestEvaluationListener.java b/test/jakarta/el/TestEvaluationListener.java
index ef0acc1e96..196c55d8a7 100644
--- a/test/jakarta/el/TestEvaluationListener.java
+++ b/test/jakarta/el/TestEvaluationListener.java
@@ -23,7 +23,7 @@ import jakarta.el.TesterEvaluationListener.Pair;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class TestEvaluationListener {
+public class TestEvaluationListener extends ELBaseTest {
 
 
     @Test
diff --git a/test/org/apache/el/TestMethodExpressionImpl.java b/test/org/apache/el/TestMethodExpressionImpl.java
index 4575866012..0789c94984 100644
--- a/test/org/apache/el/TestMethodExpressionImpl.java
+++ b/test/org/apache/el/TestMethodExpressionImpl.java
@@ -18,6 +18,7 @@ package org.apache.el;
 
 import java.util.function.Function;
 
+import jakarta.el.ELBaseTest;
 import jakarta.el.ELContext;
 import jakarta.el.ELProcessor;
 import jakarta.el.ExpressionFactory;
@@ -32,7 +33,7 @@ import org.junit.Test;
 
 import org.apache.jasper.el.ELContextImpl;
 
-public class TestMethodExpressionImpl {
+public class TestMethodExpressionImpl extends ELBaseTest {
 
     private static final String BUG53792 = "TEST_PASS";
 
diff --git a/test/org/apache/el/TestValueExpressionImpl.java b/test/org/apache/el/TestValueExpressionImpl.java
index b81ae5e76a..ba5bb6dd8e 100644
--- a/test/org/apache/el/TestValueExpressionImpl.java
+++ b/test/org/apache/el/TestValueExpressionImpl.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import jakarta.el.ELBaseTest;
 import jakarta.el.ELContext;
 import jakarta.el.ExpressionFactory;
 import jakarta.el.ValueExpression;
@@ -32,7 +33,7 @@ import org.junit.Test;
 
 import org.apache.jasper.el.ELContextImpl;
 
-public class TestValueExpressionImpl {
+public class TestValueExpressionImpl extends ELBaseTest {
 
     @Test
     public void testGetValueReference() {
diff --git a/test/org/apache/el/parser/TestAstAssign.java b/test/org/apache/el/parser/TestAstAssign.java
index 3e0e0cd750..9db6d6ca2a 100644
--- a/test/org/apache/el/parser/TestAstAssign.java
+++ b/test/org/apache/el/parser/TestAstAssign.java
@@ -16,6 +16,7 @@
  */
 package org.apache.el.parser;
 
+import jakarta.el.ELBaseTest;
 import jakarta.el.ELContext;
 import jakarta.el.ELManager;
 import jakarta.el.ELProcessor;
@@ -25,7 +26,7 @@ import jakarta.el.ValueExpression;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class TestAstAssign {
+public class TestAstAssign extends ELBaseTest {
 
     @Test
     public void testGetValue01() {
diff --git a/test/org/apache/el/parser/TestELParser.java b/test/org/apache/el/parser/TestELParser.java
index a564f82f47..3165556079 100644
--- a/test/org/apache/el/parser/TestELParser.java
+++ b/test/org/apache/el/parser/TestELParser.java
@@ -18,6 +18,7 @@ package org.apache.el.parser;
 
 import java.io.StringReader;
 
+import jakarta.el.ELBaseTest;
 import jakarta.el.ELContext;
 import jakarta.el.ELException;
 import jakarta.el.ExpressionFactory;
@@ -30,7 +31,7 @@ import org.junit.Test;
 import org.apache.jasper.el.ELContextImpl;
 import org.apache.tomcat.util.collections.SynchronizedStack;
 
-public class TestELParser {
+public class TestELParser extends ELBaseTest {
 
     @Test
     public void testBug49081() {
diff --git a/test/org/apache/el/stream/TestCollectionOperations.java b/test/org/apache/el/stream/TestCollectionOperations.java
index 1d33a6c5ab..05c0068596 100644
--- a/test/org/apache/el/stream/TestCollectionOperations.java
+++ b/test/org/apache/el/stream/TestCollectionOperations.java
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import jakarta.el.ELBaseTest;
 import jakarta.el.ELException;
 import jakarta.el.ELProcessor;
 
@@ -29,7 +30,7 @@ import org.junit.Test;
 import org.apache.el.TesterBeanA;
 import org.apache.el.lang.ELSupport;
 
-public class TestCollectionOperations {
+public class TestCollectionOperations extends ELBaseTest {
 
     private static final TesterBeanA bean01 = new TesterBeanA();
     private static final TesterBeanA bean02 = new TesterBeanA();


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 02/06: Clean-up. Reformatting. No functional change.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e69445213b78e8664d09c65a729956a0f7b6113b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 22 18:07:58 2023 +0000

    Clean-up. Reformatting. No functional change.
---
 test/jakarta/el/TestArrayELResolver.java           | 147 ++++++----------
 test/jakarta/el/TestBeanELResolver.java            | 193 ++++++++++-----------
 .../el/TestBeanELResolverVarargsInvocation.java    |  16 +-
 test/jakarta/el/TestBeanNameELResolver.java        | 114 +++++-------
 test/jakarta/el/TestCompositeELResolver.java       |   3 +-
 test/jakarta/el/TestELContext.java                 |  24 +--
 test/jakarta/el/TestELProcessor.java               |  15 +-
 test/jakarta/el/TestELResolver.java                |  32 +---
 test/jakarta/el/TestEvaluationListener.java        |   6 +-
 test/jakarta/el/TestImportHandler.java             |  17 +-
 .../el/TestImportHandlerStandardPackages.java      |  37 ++--
 test/jakarta/el/TestListELResolver.java            | 112 +++++-------
 test/jakarta/el/TestMapELResolver.java             |  96 +++++-----
 test/jakarta/el/TestResourceBundleELResolver.java  |  93 ++++------
 test/jakarta/el/TestStaticFieldELResolver.java     | 182 ++++++++-----------
 test/jakarta/el/TesterBean.java                    |   2 +-
 test/jakarta/el/TesterBeanNameResolver.java        |   5 +-
 test/jakarta/el/TesterEvaluationListener.java      |   3 +-
 .../jakarta/el/TesterImportHandlerPerformance.java |  14 +-
 19 files changed, 449 insertions(+), 662 deletions(-)

diff --git a/test/jakarta/el/TestArrayELResolver.java b/test/jakarta/el/TestArrayELResolver.java
index bc359fcd89..769494d43e 100644
--- a/test/jakarta/el/TestArrayELResolver.java
+++ b/test/jakarta/el/TestArrayELResolver.java
@@ -35,8 +35,7 @@ public class TestArrayELResolver {
      */
     @Test
     public void testGetType02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE, true);
     }
 
     /**
@@ -45,8 +44,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetType03() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Class<?> result = resolver.getType(context, base, Integer.valueOf(0));
@@ -61,8 +59,7 @@ public class TestArrayELResolver {
     @Test(expected = PropertyNotFoundException.class)
     public void testGetType04() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.getType(context, base, Integer.valueOf(1));
@@ -74,8 +71,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetType05() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Class<?> result = resolver.getType(context, base, "index");
@@ -90,8 +86,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetType06() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Class<?> result = resolver.getType(context, null, "index");
 
@@ -113,8 +108,7 @@ public class TestArrayELResolver {
      */
     @Test
     public void testGetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE, true);
     }
 
     /**
@@ -123,8 +117,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetValue03() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Object result = resolver.getValue(context, base, Integer.valueOf(0));
@@ -136,8 +129,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetValueCoercion01() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Object result = resolver.getValue(context, base, Character.valueOf((char) 0));
@@ -149,8 +141,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetValueCoercion02a() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Object result = resolver.getValue(context, base, Boolean.FALSE);
@@ -162,8 +153,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetValueCoercion02b() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Object result = resolver.getValue(context, base, Boolean.TRUE);
@@ -175,8 +165,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetValueCoercion03() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Object result = resolver.getValue(context, base, "0");
@@ -188,8 +177,7 @@ public class TestArrayELResolver {
     @Test(expected = IllegalArgumentException.class)
     public void testGetValueCoercion04() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.getValue(context, base, new Object());
@@ -198,8 +186,7 @@ public class TestArrayELResolver {
     @Test(expected = IllegalArgumentException.class)
     public void testGetValueCoercion05() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.getValue(context, base, null);
@@ -211,8 +198,7 @@ public class TestArrayELResolver {
     @Test(expected = IllegalArgumentException.class)
     public void testGetValueCoercion06() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.getValue(context, base, "key");
@@ -224,8 +210,7 @@ public class TestArrayELResolver {
     @Test
     public void testGetValue05() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         Object result = resolver.getValue(context, base, Integer.valueOf(1));
@@ -253,8 +238,7 @@ public class TestArrayELResolver {
      */
     @Test
     public void testSetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE,
-                false);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE, false);
     }
 
     /**
@@ -263,8 +247,7 @@ public class TestArrayELResolver {
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue03() {
         ArrayELResolver resolver = new ArrayELResolver(true);
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         resolver.setValue(context, new String[] {}, new Object(), new Object());
     }
@@ -275,20 +258,17 @@ public class TestArrayELResolver {
     @Test
     public void testSetValue04() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.setValue(context, base, Integer.valueOf(0), "new-element");
 
-        Assert.assertEquals("new-element",
-                resolver.getValue(context, base, Integer.valueOf(0)));
+        Assert.assertEquals("new-element", resolver.getValue(context, base, Integer.valueOf(0)));
         Assert.assertTrue(context.isPropertyResolved());
 
         resolver.setValue(context, base, Integer.valueOf(0), null);
 
-        Assert.assertEquals(null,
-                resolver.getValue(context, base, Integer.valueOf(0)));
+        Assert.assertEquals(null, resolver.getValue(context, base, Integer.valueOf(0)));
         Assert.assertTrue(context.isPropertyResolved());
     }
 
@@ -298,8 +278,7 @@ public class TestArrayELResolver {
     @Test(expected = IllegalArgumentException.class)
     public void testSetValue05() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.setValue(context, base, "key", "new-element");
@@ -311,36 +290,31 @@ public class TestArrayELResolver {
     @Test(expected = PropertyNotFoundException.class)
     public void testSetValue06() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.setValue(context, base, Integer.valueOf(1), "new-element");
     }
 
     /**
-     * Tests that an exception will be thrown if the value is not from the
-     * corresponding type.
+     * Tests that an exception will be thrown if the value is not from the corresponding type.
      */
     @Test(expected = ClassCastException.class)
     public void testSetValue07() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.setValue(context, base, Integer.valueOf(0), Integer.valueOf(1));
     }
 
     /**
-     * Tests setting arrays of primitives.
-     * https://bz.apache.org/bugzilla/show_bug.cgi?id=55691
+     * Tests setting arrays of primitives. https://bz.apache.org/bugzilla/show_bug.cgi?id=55691
      */
     @Test
     public void testSetValue08() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         int[] base = new int[] { 1, 2, 3 };
         resolver.setValue(context, base, Integer.valueOf(1), Integer.valueOf(4));
@@ -354,8 +328,7 @@ public class TestArrayELResolver {
     @Test
     public void testSetValue09() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         resolver.setValue(context, null, Integer.valueOf(1), Integer.valueOf(4));
         Assert.assertFalse(context.isPropertyResolved());
@@ -376,11 +349,9 @@ public class TestArrayELResolver {
     @Test
     public void testIsReadOnly02() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = resolver.isReadOnly(context, new Object(),
-                new Object());
+        boolean result = resolver.isReadOnly(context, new Object(), new Object());
 
         Assert.assertFalse(result);
         Assert.assertFalse(context.isPropertyResolved());
@@ -394,14 +365,13 @@ public class TestArrayELResolver {
     }
 
     /**
-     * Tests that if the ArrayELResolver is constructed with readOnly the method
-     * will return always true, otherwise false.
+     * Tests that if the ArrayELResolver is constructed with readOnly the method will return always true, otherwise
+     * false.
      */
     @Test
     public void testIsReadOnly03() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         boolean result = resolver.isReadOnly(context, base, Integer.valueOf(0));
@@ -432,8 +402,7 @@ public class TestArrayELResolver {
 
     private void doTestIsReadOutOfBounds(int index) {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         resolver.isReadOnly(context, base, Integer.valueOf(index));
@@ -446,8 +415,7 @@ public class TestArrayELResolver {
     @Test
     public void testIsReadOnly06() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         String[] base = new String[] { "element" };
         boolean result = resolver.isReadOnly(context, base, "key");
@@ -466,8 +434,7 @@ public class TestArrayELResolver {
     @Test
     public void testIsReadOnly07() {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         boolean result = resolver.isReadOnly(context, null, null);
 
@@ -482,30 +449,28 @@ public class TestArrayELResolver {
         Assert.assertFalse(context.isPropertyResolved());
     }
 
-    private void doNegativeTest(Object base, Object trigger,
-            MethodUnderTest method, boolean checkResult) {
+    private void doNegativeTest(Object base, Object trigger, MethodUnderTest method, boolean checkResult) {
         ArrayELResolver resolver = new ArrayELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = null;
         switch (method) {
-        case GET_VALUE: {
-            result = resolver.getValue(context, base, trigger);
-            break;
-        }
-        case SET_VALUE: {
-            resolver.setValue(context, base, trigger, new Object());
-            break;
-        }
-        case GET_TYPE: {
-            result = resolver.getType(context, base, trigger);
-            break;
-        }
-        default: {
-            // Should never happen
-            Assert.fail("Missing case for method");
-        }
+            case GET_VALUE: {
+                result = resolver.getValue(context, base, trigger);
+                break;
+            }
+            case SET_VALUE: {
+                resolver.setValue(context, base, trigger, new Object());
+                break;
+            }
+            case GET_TYPE: {
+                result = resolver.getType(context, base, trigger);
+                break;
+            }
+            default: {
+                // Should never happen
+                Assert.fail("Missing case for method");
+            }
         }
 
         if (checkResult) {
@@ -515,7 +480,9 @@ public class TestArrayELResolver {
     }
 
     private enum MethodUnderTest {
-        GET_VALUE, SET_VALUE, GET_TYPE
+        GET_VALUE,
+        SET_VALUE,
+        GET_TYPE
     }
 
 
@@ -539,7 +506,7 @@ public class TestArrayELResolver {
     public void testGetCommonPropertyType03() {
         // array base, Integer response
         ArrayELResolver resolver = new ArrayELResolver();
-        Class<?> clazz = resolver.getCommonPropertyType(null, new Object[]{});
+        Class<?> clazz = resolver.getCommonPropertyType(null, new Object[] {});
         Assert.assertNotNull(clazz);
         Assert.assertEquals(clazz, Integer.class);
     }
diff --git a/test/jakarta/el/TestBeanELResolver.java b/test/jakarta/el/TestBeanELResolver.java
index 073ce4798e..be0b706ccc 100644
--- a/test/jakarta/el/TestBeanELResolver.java
+++ b/test/jakarta/el/TestBeanELResolver.java
@@ -45,13 +45,11 @@ public class TestBeanELResolver {
 
         Bean bean = new Bean();
 
-        ValueExpression varBean =
-            factory.createValueExpression(bean, Bean.class);
+        ValueExpression varBean = factory.createValueExpression(bean, Bean.class);
         context.getVariableMapper().setVariable("bean", varBean);
 
 
-        ValueExpression ve = factory.createValueExpression(
-                context, "${bean.valueA}", String.class);
+        ValueExpression ve = factory.createValueExpression(context, "${bean.valueA}", String.class);
         Exception e = null;
         try {
             ve.getValue(context);
@@ -62,8 +60,7 @@ public class TestBeanELResolver {
         String type = Bean.class.getName();
         @SuppressWarnings("null") // Not possible due to test above
         String msg = e.getMessage();
-        Assert.assertTrue("No reference to type [" + type +
-                "] where property cannot be found in [" + msg + "]",
+        Assert.assertTrue("No reference to type [" + type + "] where property cannot be found in [" + msg + "]",
                 msg.contains(type));
     }
 
@@ -111,8 +108,7 @@ public class TestBeanELResolver {
     }
 
     /**
-     * Tests that an exception will be thrown when a coercion cannot be
-     * performed.
+     * Tests that an exception will be thrown when a coercion cannot be performed.
      */
     @Test(expected = PropertyNotFoundException.class)
     public void testGetType05() {
@@ -165,8 +161,7 @@ public class TestBeanELResolver {
     }
 
     /**
-     * Tests that an exception will be thrown when a coercion cannot be
-     * performed.
+     * Tests that an exception will be thrown when a coercion cannot be performed.
      */
     @Test(expected = PropertyNotFoundException.class)
     public void testGetValue05() {
@@ -242,8 +237,7 @@ public class TestBeanELResolver {
     }
 
     /**
-     * Tests that an exception will be thrown when a coercion cannot be
-     * performed.
+     * Tests that an exception will be thrown when a coercion cannot be performed.
      */
     @Test(expected = PropertyNotFoundException.class)
     public void testSetValue05() {
@@ -265,8 +259,7 @@ public class TestBeanELResolver {
     }
 
     /**
-     * Tests that an exception will be thrown when the property does not have
-     * setter method.
+     * Tests that an exception will be thrown when the property does not have setter method.
      */
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue07() {
@@ -305,8 +298,7 @@ public class TestBeanELResolver {
     }
 
     /**
-     * Tests that if the BeanELResolver is constructed with readOnly the method
-     * will return always true.
+     * Tests that if the BeanELResolver is constructed with readOnly the method will return always true.
      */
     @Test
     public void testIsReadOnly03() {
@@ -349,8 +341,7 @@ public class TestBeanELResolver {
     }
 
     /**
-     * Tests that true will be returned when the property does not have setter
-     * method.
+     * Tests that true will be returned when the property does not have setter method.
      */
     @Test
     public void testIsReadOnly06() {
@@ -388,8 +379,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), METHOD01_NAME,
-                new Class<?>[] {}, new Object[] {});
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), METHOD01_NAME, new Class<?>[] {},
+                new Object[] {});
 
         Assert.assertEquals(BEAN_NAME, result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -411,8 +402,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        resolver.invoke(context, new TesterBean(BEAN_NAME), METHOD02_NAME, new Class<?>[] {},
-                new Object[] {});
+        resolver.invoke(context, new TesterBean(BEAN_NAME), METHOD02_NAME, new Class<?>[] {}, new Object[] {});
     }
 
     /**
@@ -423,8 +413,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        resolver.invoke(context, new TesterBean(BEAN_NAME), METHOD03_NAME, new Class<?>[] {},
-                new Object[] {});
+        resolver.invoke(context, new TesterBean(BEAN_NAME), METHOD03_NAME, new Class<?>[] {}, new Object[] {});
     }
 
     @Test
@@ -432,8 +421,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] {}, new String[] {});
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] {},
+                new String[] {});
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -443,8 +432,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                null, null);
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", null, null);
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -454,8 +442,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                null, new String[] {});
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", null, new String[] {});
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -465,8 +452,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] {}, null);
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] {}, null);
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -476,8 +462,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { null }, new String[] { null });
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] { null },
+                new String[] { null });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -487,8 +473,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                null, new String[] { null });
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", null,
+                new String[] { null });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -498,8 +484,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { null }, null);
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] { null },
+                null);
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -581,7 +567,7 @@ public class TestBeanELResolver {
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargsCoerce15() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
@@ -598,25 +584,23 @@ public class TestBeanELResolver {
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { String.class, String.class, String.class },
-                new Object[] { "10", "11", "12" });
+                new Class<?>[] { String.class, String.class, String.class }, new Object[] { "10", "11", "12" });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargsCoerce17() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { String.class, String.class },
-                new Object[] { "10", "11", "12" });
+                new Class<?>[] { String.class, String.class }, new Object[] { "10", "11", "12" });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargsCoerce18() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
@@ -640,19 +624,18 @@ public class TestBeanELResolver {
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargsCoerce20() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { String.class, String.class, String.class },
-                new Object[] { "true", "10", "11", "12" });
+                new Class<?>[] { String.class, String.class, String.class }, new Object[] { "true", "10", "11", "12" });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargsCoerce21() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
@@ -671,20 +654,18 @@ public class TestBeanELResolver {
         context.addELResolver(new StringToLongNeverFailResolver());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { String.class, String.class, String.class },
-                new Object[] { "AA", "BB", "CC" });
+                new Class<?>[] { String.class, String.class, String.class }, new Object[] { "AA", "BB", "CC" });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargsCoerce23() {
         BeanELResolver resolver = new BeanELResolver();
         StandardELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { String.class, String.class, String.class },
-                new Object[] { "AA", "BB", "CC" });
+                new Class<?>[] { String.class, String.class, String.class }, new Object[] { "AA", "BB", "CC" });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -694,8 +675,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] {}, new Object[] {});
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] {},
+                new Object[] {});
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -705,8 +686,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                null, null);
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", null, null);
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -716,8 +696,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                null, new Object[] {});
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", null, new Object[] {});
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -727,8 +706,7 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] {}, null);
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] {}, null);
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -738,8 +716,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { null }, new Object[] { null });
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] { null },
+                new Object[] { null });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -749,8 +727,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                null, new Object[] { null });
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", null,
+                new Object[] { null });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -760,8 +738,8 @@ public class TestBeanELResolver {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { null }, null);
+        Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs", new Class<?>[] { null },
+                null);
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -827,13 +805,14 @@ public class TestBeanELResolver {
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
-                new Class<?>[] { Integer.class, Integer.class }, new Object[] { Integer.valueOf(10), Integer.valueOf(11) });
+                new Class<?>[] { Integer.class, Integer.class },
+                new Object[] { Integer.valueOf(10), Integer.valueOf(11) });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
     // Note: The coercion rules are that a null of any type can be coerced to a
-    //       null of *any* other type so this works.
+    // null of *any* other type so this works.
     @Test
     public void testInvokeVarargs14() {
         BeanELResolver resolver = new BeanELResolver();
@@ -845,7 +824,7 @@ public class TestBeanELResolver {
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargs15() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
@@ -863,31 +842,31 @@ public class TestBeanELResolver {
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
                 new Class<?>[] { Integer.class, Integer.class, Integer.class },
-                new Object[] { Integer.valueOf(10), Integer.valueOf(11),  Integer.valueOf(12) });
+                new Object[] { Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12) });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargs17() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
                 new Class<?>[] { Integer.class, Integer.class },
-                new Object[] { Integer.valueOf(10), Integer.valueOf(11),  Integer.valueOf(12) });
+                new Object[] { Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12) });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargs18() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
                 new Class<?>[] { Integer.class, Integer.class, Integer.class, Integer.class },
-                new Object[] { Integer.valueOf(10), Integer.valueOf(11),  Integer.valueOf(12) });
+                new Object[] { Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12) });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -899,31 +878,31 @@ public class TestBeanELResolver {
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
                 new Class<?>[] { Boolean.class, Integer.class, Integer.class, Integer.class },
-                new Object[] { Boolean.TRUE, Integer.valueOf(10), Integer.valueOf(11),  Integer.valueOf(12) });
+                new Object[] { Boolean.TRUE, Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12) });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargs20() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
                 new Class<?>[] { Boolean.class, Integer.class, Integer.class },
-                new Object[] { Boolean.TRUE, Integer.valueOf(10), Integer.valueOf(11),  Integer.valueOf(12) });
+                new Object[] { Boolean.TRUE, Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12) });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
 
-    @Test(expected=MethodNotFoundException.class)
+    @Test(expected = MethodNotFoundException.class)
     public void testInvokeVarargs21() {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.invoke(context, new TesterBean(BEAN_NAME), "getNameVarargs",
                 new Class<?>[] { Boolean.class, Integer.class, Integer.class, Integer.class, Integer.class },
-                new Object[] { Boolean.TRUE, Integer.valueOf(10), Integer.valueOf(11),  Integer.valueOf(12) });
+                new Object[] { Boolean.TRUE, Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12) });
 
         Assert.assertEquals(BEAN_NAME, result);
     }
@@ -959,33 +938,32 @@ public class TestBeanELResolver {
     }
 
 
-    private void doNegativeTest(Object base, Object trigger, MethodUnderTest method,
-            boolean checkResult) {
+    private void doNegativeTest(Object base, Object trigger, MethodUnderTest method, boolean checkResult) {
         BeanELResolver resolver = new BeanELResolver();
         ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = null;
         switch (method) {
-        case GET_VALUE: {
-            result = resolver.getValue(context, base, trigger);
-            break;
-        }
-        case SET_VALUE: {
-            resolver.setValue(context, base, trigger, new Object());
-            break;
-        }
-        case GET_TYPE: {
-            result = resolver.getType(context, base, trigger);
-            break;
-        }
-        case INVOKE: {
-            result = resolver.invoke(context, base, trigger, new Class<?>[0], new Object[0]);
-            break;
-        }
-        default: {
-            // Should never happen
-            Assert.fail("Missing case for method");
-        }
+            case GET_VALUE: {
+                result = resolver.getValue(context, base, trigger);
+                break;
+            }
+            case SET_VALUE: {
+                resolver.setValue(context, base, trigger, new Object());
+                break;
+            }
+            case GET_TYPE: {
+                result = resolver.getType(context, base, trigger);
+                break;
+            }
+            case INVOKE: {
+                result = resolver.invoke(context, base, trigger, new Class<?>[0], new Object[0]);
+                break;
+            }
+            default: {
+                // Should never happen
+                Assert.fail("Missing case for method");
+            }
         }
 
         if (checkResult) {
@@ -995,13 +973,16 @@ public class TestBeanELResolver {
     }
 
     private enum MethodUnderTest {
-        GET_VALUE, SET_VALUE, GET_TYPE, INVOKE
+        GET_VALUE,
+        SET_VALUE,
+        GET_TYPE,
+        INVOKE
     }
 
 
     /*
-     * Custom resolver that will always convert a string to an integer. If the
-     * provided string is not a valid integer, zero will be returned.
+     * Custom resolver that will always convert a string to an integer. If the provided string is not a valid integer,
+     * zero will be returned.
      */
     private static class StringToLongNeverFailResolver extends ELResolver {
 
diff --git a/test/jakarta/el/TestBeanELResolverVarargsInvocation.java b/test/jakarta/el/TestBeanELResolverVarargsInvocation.java
index 926b25191a..89f913f6b1 100644
--- a/test/jakarta/el/TestBeanELResolverVarargsInvocation.java
+++ b/test/jakarta/el/TestBeanELResolverVarargsInvocation.java
@@ -58,8 +58,7 @@ public class TestBeanELResolverVarargsInvocation {
                 private Map<String, ValueExpression> vars = new HashMap<>();
 
                 @Override
-                public ValueExpression setVariable(String arg0,
-                        ValueExpression arg1) {
+                public ValueExpression setVariable(String arg0, ValueExpression arg1) {
                     if (arg1 == null) {
                         return vars.remove(arg0);
                     } else {
@@ -102,21 +101,18 @@ public class TestBeanELResolverVarargsInvocation {
      */
     @Test
     public void testJoinDelimited() {
-        Assert.assertEquals(foo.joinDelimited("-", "foo", "bar", "baz"),
-            beanELResolver.invoke(elContext, foo, "joinDelimited", null,
-                    new Object[] { "-", "foo", "bar", "baz" }));
+        Assert.assertEquals(foo.joinDelimited("-", "foo", "bar", "baz"), beanELResolver.invoke(elContext, foo,
+                "joinDelimited", null, new Object[] { "-", "foo", "bar", "baz" }));
     }
 
     /**
-     * Tests varargs that constitute a method's only parameters, as well as
-     * bogus results due to improper matching of ANY vararg method, and
-     * depending on the order in which reflected methods are encountered.
+     * Tests varargs that constitute a method's only parameters, as well as bogus results due to improper matching of
+     * ANY vararg method, and depending on the order in which reflected methods are encountered.
      */
     @Test
     public void testJoin() {
         Assert.assertEquals(foo.join("foo", "bar", "baz"),
-            beanELResolver.invoke(elContext, foo, "join", null,
-                    new Object[] { "foo", "bar", "baz" }));
+                beanELResolver.invoke(elContext, foo, "join", null, new Object[] { "foo", "bar", "baz" }));
     }
 
 }
\ No newline at end of file
diff --git a/test/jakarta/el/TestBeanNameELResolver.java b/test/jakarta/el/TestBeanNameELResolver.java
index bc92c5456c..1ab43b3463 100644
--- a/test/jakarta/el/TestBeanNameELResolver.java
+++ b/test/jakarta/el/TestBeanNameELResolver.java
@@ -29,8 +29,7 @@ public class TestBeanNameELResolver {
     private static final TesterBean BEAN99 = new TesterBean(BEAN99_NAME);
 
     /**
-     * Creates the resolver that is used for the test. All the tests use a
-     * resolver with the same configuration.
+     * Creates the resolver that is used for the test. All the tests use a resolver with the same configuration.
      */
     private BeanNameELResolver createBeanNameELResolver() {
         return createBeanNameELResolver(true);
@@ -43,8 +42,7 @@ public class TestBeanNameELResolver {
         beanNameResolver.setBeanValue(BEAN02_NAME, BEAN02);
         beanNameResolver.setAllowCreate(allowCreate);
 
-        BeanNameELResolver beanNameELResolver =
-                new BeanNameELResolver(beanNameResolver);
+        BeanNameELResolver beanNameELResolver = new BeanNameELResolver(beanNameResolver);
         return beanNameELResolver;
     }
 
@@ -52,7 +50,7 @@ public class TestBeanNameELResolver {
     /**
      * Tests that a null context results in an NPE as per EL Javadoc.
      */
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testGetValue01() {
         BeanNameELResolver resolver = createBeanNameELResolver();
         resolver.getValue(null, new Object(), new Object());
@@ -66,8 +64,7 @@ public class TestBeanNameELResolver {
     public void testGetValue02() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.getValue(context, null, BEAN01_NAME);
 
@@ -83,8 +80,7 @@ public class TestBeanNameELResolver {
     public void testGetValue03() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.getValue(context, new Object(), BEAN01_NAME);
 
@@ -94,15 +90,14 @@ public class TestBeanNameELResolver {
 
 
     /**
-     * Tests that a valid bean is not resolved if property is not a String even
-     * if it can be coerced to a valid bean name.
+     * Tests that a valid bean is not resolved if property is not a String even if it can be coerced to a valid bean
+     * name.
      */
     @Test
     public void testGetValue04() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object property = new Object() {
             @Override
@@ -125,8 +120,7 @@ public class TestBeanNameELResolver {
     public void testGetValue05() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.getValue(context, null, BEAN99_NAME);
 
@@ -140,8 +134,7 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testGetValue06() {
-        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME,
-                MethodUnderTest.GET_VALUE);
+        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME, MethodUnderTest.GET_VALUE);
     }
 
 
@@ -150,15 +143,14 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testGetValue07() {
-        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME,
-                MethodUnderTest.GET_VALUE);
+        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME, MethodUnderTest.GET_VALUE);
     }
 
 
     /**
      * Tests that a null context results in an NPE as per EL Javadoc.
      */
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testSetValue01() {
         BeanNameELResolver resolver = createBeanNameELResolver();
         resolver.setValue(null, new Object(), new Object(), new Object());
@@ -204,20 +196,18 @@ public class TestBeanNameELResolver {
     /**
      * Test replacing a read-only bean with create enabled.
      */
-    @Test(expected=PropertyNotWritableException.class)
+    @Test(expected = PropertyNotWritableException.class)
     public void testSetValue06() {
-        doSetValueCreateReplaceTest(true,
-                TesterBeanNameResolver.READ_ONLY_NAME);
+        doSetValueCreateReplaceTest(true, TesterBeanNameResolver.READ_ONLY_NAME);
     }
 
 
     /**
      * Test replacing a read-only bean with create disable.
      */
-    @Test(expected=PropertyNotWritableException.class)
+    @Test(expected = PropertyNotWritableException.class)
     public void testSetValue07() {
-        doSetValueCreateReplaceTest(false,
-                TesterBeanNameResolver.READ_ONLY_NAME);
+        doSetValueCreateReplaceTest(false, TesterBeanNameResolver.READ_ONLY_NAME);
     }
 
 
@@ -226,8 +216,7 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testSetValue08() {
-        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME,
-                MethodUnderTest.SET_VALUE);
+        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME, MethodUnderTest.SET_VALUE);
     }
 
 
@@ -236,15 +225,14 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testSetValue09() {
-        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME,
-                MethodUnderTest.SET_VALUE);
+        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME, MethodUnderTest.SET_VALUE);
     }
 
 
     /**
      * Tests that a null context results in an NPE as per EL Javadoc.
      */
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testGetType01() {
         BeanNameELResolver resolver = createBeanNameELResolver();
         resolver.getType(null, new Object(), new Object());
@@ -258,8 +246,7 @@ public class TestBeanNameELResolver {
     public void testGetType02() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Class<?> result = resolver.getType(context, null, BEAN01_NAME);
 
@@ -275,8 +262,7 @@ public class TestBeanNameELResolver {
     public void testGetType03() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Class<?> result = resolver.getType(context, new Object(), BEAN01_NAME);
 
@@ -286,15 +272,14 @@ public class TestBeanNameELResolver {
 
 
     /**
-     * Tests that a valid bean is not resolved if property is not a String even
-     * if it can be coerced to a valid bean name.
+     * Tests that a valid bean is not resolved if property is not a String even if it can be coerced to a valid bean
+     * name.
      */
     @Test
     public void testGetType04() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object property = new Object() {
             @Override
@@ -317,8 +302,7 @@ public class TestBeanNameELResolver {
     public void testGetType05() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Class<?> result = resolver.getType(context, null, BEAN99_NAME);
 
@@ -332,8 +316,7 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testGetType06() {
-        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME,
-                MethodUnderTest.GET_TYPE);
+        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME, MethodUnderTest.GET_TYPE);
     }
 
 
@@ -342,15 +325,14 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testGetType07() {
-        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME,
-                MethodUnderTest.GET_TYPE);
+        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME, MethodUnderTest.GET_TYPE);
     }
 
 
     /**
      * Tests that a null context results in an NPE as per EL Javadoc.
      */
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testIsReadOnly01() {
         BeanNameELResolver resolver = createBeanNameELResolver();
         resolver.isReadOnly(null, new Object(), new Object());
@@ -364,8 +346,7 @@ public class TestBeanNameELResolver {
     public void testIsReadOnly02() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         boolean result = resolver.isReadOnly(context, null, BEAN01_NAME);
 
@@ -381,11 +362,9 @@ public class TestBeanNameELResolver {
     public void testIsReadOnly03() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = resolver.isReadOnly(context, null,
-                TesterBeanNameResolver.READ_ONLY_NAME);
+        boolean result = resolver.isReadOnly(context, null, TesterBeanNameResolver.READ_ONLY_NAME);
 
         Assert.assertTrue(result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -399,8 +378,7 @@ public class TestBeanNameELResolver {
     public void testIsReadOnly04() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         resolver.isReadOnly(context, new Object(), BEAN01_NAME);
 
@@ -409,15 +387,14 @@ public class TestBeanNameELResolver {
 
 
     /**
-     * Tests that a valid bean is not resolved if property is not a String even
-     * if it can be coerced to a valid bean name.
+     * Tests that a valid bean is not resolved if property is not a String even if it can be coerced to a valid bean
+     * name.
      */
     @Test
     public void testIsReadOnly05() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object property = new Object() {
             @Override
@@ -439,8 +416,7 @@ public class TestBeanNameELResolver {
     public void testIsReadOnly06() {
 
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         resolver.isReadOnly(context, null, BEAN99_NAME);
 
@@ -453,8 +429,7 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testIsReadOnly07() {
-        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME,
-                MethodUnderTest.IS_READ_ONLY);
+        doThrowableTest(TesterBeanNameResolver.EXCEPTION_TRIGGER_NAME, MethodUnderTest.IS_READ_ONLY);
     }
 
 
@@ -463,8 +438,7 @@ public class TestBeanNameELResolver {
      */
     @Test
     public void testIsReadOnly08() {
-        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME,
-                MethodUnderTest.IS_READ_ONLY);
+        doThrowableTest(TesterBeanNameResolver.THROWABLE_TRIGGER_NAME, MethodUnderTest.IS_READ_ONLY);
     }
 
 
@@ -473,8 +447,7 @@ public class TestBeanNameELResolver {
      */
     public void testGetCommonPropertyType01() {
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = resolver.getCommonPropertyType(context, null);
 
@@ -497,8 +470,7 @@ public class TestBeanNameELResolver {
 
     private void doThrowableTest(String trigger, MethodUnderTest method) {
         BeanNameELResolver resolver = createBeanNameELResolver();
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         ELException elException = null;
         try {
@@ -540,11 +512,9 @@ public class TestBeanNameELResolver {
     /**
      * Tests adding/replacing beans beans
      */
-    private void doSetValueCreateReplaceTest(boolean canCreate,
-            String beanName) {
+    private void doSetValueCreateReplaceTest(boolean canCreate, String beanName) {
         BeanNameELResolver resolver = createBeanNameELResolver(canCreate);
-        ELContext context =
-                new StandardELContext(ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         // Get bean one to be sure it has been replaced when testing replace
         Object bean = resolver.getValue(context, null, BEAN01_NAME);
diff --git a/test/jakarta/el/TestCompositeELResolver.java b/test/jakarta/el/TestCompositeELResolver.java
index 777eed719b..eb6c582359 100644
--- a/test/jakarta/el/TestCompositeELResolver.java
+++ b/test/jakarta/el/TestCompositeELResolver.java
@@ -30,8 +30,7 @@ public class TestCompositeELResolver extends TomcatBaseTest {
     public void testBug50408() throws Exception {
         getTomcatInstanceTestWebapp(true, true);
 
-        int rc = getUrl("http://localhost:" + getPort() +
-                "/test/bug5nnnn/bug50408.jsp", new ByteChunk(), null);
+        int rc = getUrl("http://localhost:" + getPort() + "/test/bug5nnnn/bug50408.jsp", new ByteChunk(), null);
 
         Assert.assertEquals(HttpServletResponse.SC_OK, rc);
     }
diff --git a/test/jakarta/el/TestELContext.java b/test/jakarta/el/TestELContext.java
index 0abd30c7ae..a66638d514 100644
--- a/test/jakarta/el/TestELContext.java
+++ b/test/jakarta/el/TestELContext.java
@@ -53,9 +53,8 @@ public class TestELContext {
     }
 
     /**
-     * Tests that the context object will be added to the map with context
-     * objects. The key is used as unique identifier of the context object in
-     * the map.
+     * Tests that the context object will be added to the map with context objects. The key is used as unique identifier
+     * of the context object in the map.
      */
     @Test
     public void testPutContext03() {
@@ -68,8 +67,7 @@ public class TestELContext {
     }
 
     /**
-     * Tests that propertyResolved will be set to true and the corresponding
-     * listeners will be notified.
+     * Tests that propertyResolved will be set to true and the corresponding listeners will be notified.
      */
     @Test
     public void testSetPropertyResolved() {
@@ -135,8 +133,7 @@ public class TestELContext {
     }
 
     /**
-     * Tests that if there is no ELResolver the standard coercions will be
-     * invoked.
+     * Tests that if there is no ELResolver the standard coercions will be invoked.
      */
     @Test
     public void testConvertToType02() {
@@ -147,13 +144,12 @@ public class TestELContext {
         Object result = elContext.convertToType("test", String.class);
         Assert.assertEquals("test", result);
 
-        Assert.assertTrue(originalPropertyResolved == elContext
-                .isPropertyResolved());
+        Assert.assertTrue(originalPropertyResolved == elContext.isPropertyResolved());
     }
 
     /**
-     * Tests that if there is ELResolver it will handle the conversion. If this
-     * resolver cannot return a result the standard coercions will be invoked.
+     * Tests that if there is ELResolver it will handle the conversion. If this resolver cannot return a result the
+     * standard coercions will be invoked.
      */
     @Test
     public void testConvertToType03() {
@@ -164,12 +160,10 @@ public class TestELContext {
 
         Object result = elContext.convertToType("1", String.class);
         Assert.assertEquals("ONE", result);
-        Assert.assertTrue(originalPropertyResolved == elContext
-                .isPropertyResolved());
+        Assert.assertTrue(originalPropertyResolved == elContext.isPropertyResolved());
 
         result = elContext.convertToType("test", String.class);
         Assert.assertEquals("test", result);
-        Assert.assertTrue(originalPropertyResolved == elContext
-                .isPropertyResolved());
+        Assert.assertTrue(originalPropertyResolved == elContext.isPropertyResolved());
     }
 }
diff --git a/test/jakarta/el/TestELProcessor.java b/test/jakarta/el/TestELProcessor.java
index 644a5579b8..1dd04c090a 100644
--- a/test/jakarta/el/TestELProcessor.java
+++ b/test/jakarta/el/TestELProcessor.java
@@ -29,14 +29,14 @@ public class TestELProcessor {
     }
 
 
-    @Test(expected=ELException.class)
+    @Test(expected = ELException.class)
     public void testEval01() {
         ELProcessor elp = new ELProcessor();
         elp.eval("${1+1}");
     }
 
 
-    @Test(expected=ELException.class)
+    @Test(expected = ELException.class)
     public void testEval02() {
         ELProcessor elp = new ELProcessor();
         elp.eval("#{1+1}");
@@ -55,10 +55,8 @@ public class TestELProcessor {
     @Test
     public void testDefineFunctionMethod01() throws Exception {
         ELProcessor elp = new ELProcessor();
-        elp.defineFunction("fn", "toBoolean",
-                Boolean.class.getMethod("valueOf", String.class));
-        Assert.assertEquals(Boolean.valueOf(true),
-                elp.eval("fn:toBoolean(true)"));
+        elp.defineFunction("fn", "toBoolean", Boolean.class.getMethod("valueOf", String.class));
+        Assert.assertEquals(Boolean.valueOf(true), elp.eval("fn:toBoolean(true)"));
     }
 
 
@@ -68,8 +66,7 @@ public class TestELProcessor {
         // java.lang should be automatically imported so no need for full class
         // name
         elp.defineFunction("fn", "toBoolean", "Boolean", "valueOf");
-        Assert.assertEquals(Boolean.valueOf(true),
-                elp.eval("fn:toBoolean(true)"));
+        Assert.assertEquals(Boolean.valueOf(true), elp.eval("fn:toBoolean(true)"));
     }
 
 
@@ -196,7 +193,7 @@ public class TestELProcessor {
     @Test
     public void testPrimitiveArray01() {
         ELProcessor elp = new ELProcessor();
-        TesterBean bean01= new TesterBean("bean01");
+        TesterBean bean01 = new TesterBean("bean01");
         elp.defineBean("bean01", bean01);
         elp.defineBean("bean02", new TesterBean("bean02"));
 
diff --git a/test/jakarta/el/TestELResolver.java b/test/jakarta/el/TestELResolver.java
index b492ea1501..4b83910b31 100644
--- a/test/jakarta/el/TestELResolver.java
+++ b/test/jakarta/el/TestELResolver.java
@@ -25,9 +25,7 @@ public class TestELResolver {
     public void testConvertToType01() {
         ELContext context = new TesterELContext();
 
-        ValueExpression ve =
-                ELManager.getExpressionFactory().createValueExpression(
-                        context, "1", String.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "1", String.class);
 
         String result = (String) ve.getValue(context);
 
@@ -39,9 +37,7 @@ public class TestELResolver {
     public void testConvertToType02() {
         ELContext context = new TesterELContext(new TesterELResolverOne());
 
-        ValueExpression ve =
-                ELManager.getExpressionFactory().createValueExpression(
-                        context, "1", String.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "1", String.class);
 
         String result = (String) ve.getValue(context);
 
@@ -53,9 +49,7 @@ public class TestELResolver {
     public void testConvertToType03() {
         ELContext context = new TesterELContext(new TesterELResolverOne());
 
-        ValueExpression ve =
-                ELManager.getExpressionFactory().createValueExpression(
-                        context, "2", String.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "2", String.class);
 
         String result = (String) ve.getValue(context);
 
@@ -68,9 +62,7 @@ public class TestELResolver {
         CompositeELResolver resolver = new CompositeELResolver();
         ELContext context = new TesterELContext(resolver);
 
-        ValueExpression ve =
-                ELManager.getExpressionFactory().createValueExpression(
-                        context, "2", String.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "2", String.class);
 
         String result = (String) ve.getValue(context);
 
@@ -85,9 +77,7 @@ public class TestELResolver {
         resolver.add(new TesterELResolverTwo());
         ELContext context = new TesterELContext(resolver);
 
-        ValueExpression ve =
-                ELManager.getExpressionFactory().createValueExpression(
-                        context, "1", String.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "1", String.class);
 
         String result = (String) ve.getValue(context);
 
@@ -102,9 +92,7 @@ public class TestELResolver {
         resolver.add(new TesterELResolverTwo());
         ELContext context = new TesterELContext(resolver);
 
-        ValueExpression ve =
-                ELManager.getExpressionFactory().createValueExpression(
-                        context, "2", String.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "2", String.class);
 
         String result = (String) ve.getValue(context);
 
@@ -119,9 +107,7 @@ public class TestELResolver {
         resolver.add(new TesterELResolverTwo());
         ELContext context = new TesterELContext(resolver);
 
-        ValueExpression ve =
-                ELManager.getExpressionFactory().createValueExpression(
-                        context, "3", String.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "3", String.class);
 
         String result = (String) ve.getValue(context);
 
@@ -133,8 +119,8 @@ public class TestELResolver {
     public void testDefaultConvertToType() {
         ELContext context = new TesterELContext(new StaticFieldELResolver());
 
-        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(
-                        context, "${!Boolean.FALSE}", Boolean.class);
+        ValueExpression ve = ELManager.getExpressionFactory().createValueExpression(context, "${!Boolean.FALSE}",
+                Boolean.class);
 
         Boolean result = (Boolean) ve.getValue(context);
 
diff --git a/test/jakarta/el/TestEvaluationListener.java b/test/jakarta/el/TestEvaluationListener.java
index 4a0cd70d25..ef0acc1e96 100644
--- a/test/jakarta/el/TestEvaluationListener.java
+++ b/test/jakarta/el/TestEvaluationListener.java
@@ -84,8 +84,7 @@ public class TestEvaluationListener {
         ExpressionFactory factory = ELManager.getExpressionFactory();
         ELContext context = new TesterELContext();
         String expression = "${1 + 1}";
-        ValueExpression ve =
-                factory.createValueExpression(context, expression, int.class);
+        ValueExpression ve = factory.createValueExpression(context, expression, int.class);
 
         TesterEvaluationListener listener = new TesterEvaluationListener();
         context.addEvaluationListener(listener);
@@ -110,8 +109,7 @@ public class TestEvaluationListener {
         ExpressionFactory factory = ELManager.getExpressionFactory();
         ELContext context = new TesterELContext(new CompositeELResolver());
         String expression = "${foo.bar + 1}";
-        ValueExpression ve =
-                factory.createValueExpression(context, expression, int.class);
+        ValueExpression ve = factory.createValueExpression(context, expression, int.class);
 
         TesterEvaluationListener listener = new TesterEvaluationListener();
         context.addEvaluationListener(listener);
diff --git a/test/jakarta/el/TestImportHandler.java b/test/jakarta/el/TestImportHandler.java
index 7f157aae43..db4bbf5cd9 100644
--- a/test/jakarta/el/TestImportHandler.java
+++ b/test/jakarta/el/TestImportHandler.java
@@ -64,8 +64,7 @@ public class TestImportHandler {
         for (int i = 1; i <= 3; i++) {
             try {
                 Class<?> clazz = handler.resolveClass("ExceptionUtils");
-                Assert.fail("Expected ELException but got [" + clazz.getName()
-                        + "] on iteration " + i);
+                Assert.fail("Expected ELException but got [" + clazz.getName() + "] on iteration " + i);
             } catch (ELException ex) {
                 // Expected
             }
@@ -74,8 +73,7 @@ public class TestImportHandler {
 
 
     /**
-     * Multiple package imports with a single match.
-     * https://bz.apache.org/bugzilla/show_bug.cgi?id=57113
+     * Multiple package imports with a single match. https://bz.apache.org/bugzilla/show_bug.cgi?id=57113
      */
     @Test
     public void testResolveClass04() {
@@ -158,8 +156,7 @@ public class TestImportHandler {
         for (int i = 1; i <= 3; i++) {
             try {
                 handler.importClass("org.apache.jasper.util.ExceptionUtils");
-                Assert.fail("Expected ELException but got none on iteration "
-                        + i);
+                Assert.fail("Expected ELException but got none on iteration " + i);
             } catch (ELException ex) {
                 // Expected
             }
@@ -214,7 +211,7 @@ public class TestImportHandler {
     /**
      * Import an invalid static field - does not exist.
      */
-    @Test(expected=ELException.class)
+    @Test(expected = ELException.class)
     public void testImportStatic02() {
         ImportHandler handler = new ImportHandler();
 
@@ -248,8 +245,7 @@ public class TestImportHandler {
         for (int i = 1; i <= 3; i++) {
             try {
                 handler.importStatic("org.apache.tomcat.util.threads.Constants.Package");
-                Assert.fail("Expected ELException but got none on iteration "
-                        + i);
+                Assert.fail("Expected ELException but got none on iteration " + i);
             } catch (ELException ex) {
                 // Expected
             }
@@ -258,8 +254,7 @@ public class TestImportHandler {
 
 
     /**
-     * Package imports with conflicts due to non-public classes should not
-     * conflict.
+     * Package imports with conflicts due to non-public classes should not conflict.
      */
     @Test
     public void testBug57135() {
diff --git a/test/jakarta/el/TestImportHandlerStandardPackages.java b/test/jakarta/el/TestImportHandlerStandardPackages.java
index 817079394d..b93b06e586 100644
--- a/test/jakarta/el/TestImportHandlerStandardPackages.java
+++ b/test/jakarta/el/TestImportHandlerStandardPackages.java
@@ -40,9 +40,9 @@ public class TestImportHandlerStandardPackages {
         Object obj = f.get(null);
 
         @SuppressWarnings("unchecked")
-        Map<String,Set<String>> standardPackageName = (Map<String, Set<String>>) obj;
+        Map<String, Set<String>> standardPackageName = (Map<String, Set<String>>) obj;
 
-        for (Map.Entry<String,Set<String>> entry : standardPackageName.entrySet()) {
+        for (Map.Entry<String, Set<String>> entry : standardPackageName.entrySet()) {
             checkPackageClassList(entry.getKey(), entry.getValue());
         }
     }
@@ -55,28 +55,25 @@ public class TestImportHandlerStandardPackages {
             // tests are run on a newer JRE.
             // The latest version of the JRE where this test is known to pass is
             // - OpenJDK 19 EA 22
-            ModuleFinder.ofSystem().find("java.base").get().open().list()
-                    .filter(c -> (c.startsWith("java/lang/")))
-                    .filter(c -> c.lastIndexOf('/') == 9)             // Exclude sub-packages
-                    .filter(c -> c.endsWith(".class"))                // Exclude non-class resources
-                    .map(c -> c.substring(10, c.length() - 6))        // Extract class name
-                    .map(c-> {
+            ModuleFinder.ofSystem().find("java.base").get().open().list().filter(c -> (c.startsWith("java/lang/")))
+                    .filter(c -> c.lastIndexOf('/') == 9) // Exclude sub-packages
+                    .filter(c -> c.endsWith(".class")) // Exclude non-class resources
+                    .map(c -> c.substring(10, c.length() - 6)) // Extract class name
+                    .map(c -> {
                         try {
                             return Class.forName("java.lang." + c, false,
-                                    TesterImportHandlerPerformance.class.getClassLoader());   // Get the class object
+                                    TesterImportHandlerPerformance.class.getClassLoader()); // Get the class object
                         } catch (ClassNotFoundException e) {
                             throw new RuntimeException(c);
                         }
-                    })
-                    .filter(c -> null != c)
-                    .filter(c -> Modifier.isPublic(c.getModifiers())) // Exclude non-public classes
-                    .map(c -> c.getName().substring(10))              // Back to the class name
-                    .map(c -> c.replace('$',  '.'))
-                    .filter(c -> !classNames.contains(c))             // Skip classes already listed
-                    .filter(c -> !c.startsWith("FdLibm."))            // Skip public inner class
-                    .filter(c -> !c.startsWith("LiveStackFrame."))    // Skip public inner class
-                    .filter(c -> !c.startsWith("WeakPairMap."))       // Skip public inner class
-                    .forEach(c -> Assert.fail("java.lang." + c));     // Should have in list
+                    }).filter(c -> null != c).filter(c -> Modifier.isPublic(c.getModifiers())) // Exclude non-public
+                                                                                               // classes
+                    .map(c -> c.getName().substring(10)) // Back to the class name
+                    .map(c -> c.replace('$', '.')).filter(c -> !classNames.contains(c)) // Skip classes already listed
+                    .filter(c -> !c.startsWith("FdLibm.")) // Skip public inner class
+                    .filter(c -> !c.startsWith("LiveStackFrame.")) // Skip public inner class
+                    .filter(c -> !c.startsWith("WeakPairMap.")) // Skip public inner class
+                    .forEach(c -> Assert.fail("java.lang." + c)); // Should have in list
         } else {
             // When this test runs, the class loader will be loading resources
             // from a directory for each of these packages.
@@ -114,7 +111,7 @@ public class TestImportHandlerStandardPackages {
                         // Skip classes already known
                         continue;
                     }
-                    File f = new File (dir, file);
+                    File f = new File(dir, file);
                     if (!f.isFile()) {
                         // Skip directories
                         continue;
diff --git a/test/jakarta/el/TestListELResolver.java b/test/jakarta/el/TestListELResolver.java
index 0bfad0db4b..f8fa5e6633 100644
--- a/test/jakarta/el/TestListELResolver.java
+++ b/test/jakarta/el/TestListELResolver.java
@@ -39,8 +39,7 @@ public class TestListELResolver {
      */
     @Test
     public void testGetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE, true);
     }
 
     /**
@@ -49,8 +48,7 @@ public class TestListELResolver {
     @Test
     public void testGetValue03() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -66,8 +64,7 @@ public class TestListELResolver {
     @Test(expected = IllegalArgumentException.class)
     public void testGetValue04() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -80,8 +77,7 @@ public class TestListELResolver {
     @Test
     public void testGetValue05() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -110,8 +106,7 @@ public class TestListELResolver {
      */
     @Test
     public void testGetType02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE, true);
     }
 
     /**
@@ -120,8 +115,7 @@ public class TestListELResolver {
     @Test
     public void testGetType03() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -137,8 +131,7 @@ public class TestListELResolver {
     @Test(expected = PropertyNotFoundException.class)
     public void testGetType04() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -159,8 +152,7 @@ public class TestListELResolver {
      */
     @Test
     public void testSetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE,
-                false);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE, false);
     }
 
     /**
@@ -169,11 +161,9 @@ public class TestListELResolver {
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue03() {
         ListELResolver resolver = new ListELResolver(true);
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        resolver.setValue(context, new ArrayList<>(), new Object(),
-                new Object());
+        resolver.setValue(context, new ArrayList<>(), new Object(), new Object());
     }
 
     /**
@@ -182,15 +172,13 @@ public class TestListELResolver {
     @Test
     public void testSetValue04() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("value");
         resolver.setValue(context, list, Integer.valueOf(0), "value");
 
-        Assert.assertEquals("value",
-                resolver.getValue(context, list, Integer.valueOf(0)));
+        Assert.assertEquals("value", resolver.getValue(context, list, Integer.valueOf(0)));
         Assert.assertTrue(context.isPropertyResolved());
     }
 
@@ -200,8 +188,7 @@ public class TestListELResolver {
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue05() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<Object> list = Collections.unmodifiableList(new ArrayList<>());
         resolver.setValue(context, list, Integer.valueOf(0), "value");
@@ -213,8 +200,7 @@ public class TestListELResolver {
     @Test(expected = IllegalArgumentException.class)
     public void testSetValue06() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -227,8 +213,7 @@ public class TestListELResolver {
     @Test(expected = PropertyNotFoundException.class)
     public void testSetValue07() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -250,11 +235,9 @@ public class TestListELResolver {
     @Test
     public void testIsReadOnly02() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = resolver.isReadOnly(context, new Object(),
-                new Object());
+        boolean result = resolver.isReadOnly(context, new Object(), new Object());
 
         Assert.assertFalse(result);
         Assert.assertFalse(context.isPropertyResolved());
@@ -268,14 +251,13 @@ public class TestListELResolver {
     }
 
     /**
-     * Tests that if the ListELResolver is constructed with readOnly the method
-     * will return always true, otherwise false.
+     * Tests that if the ListELResolver is constructed with readOnly the method will return always true, otherwise
+     * false.
      */
     @Test
     public void testIsReadOnly03() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -298,14 +280,12 @@ public class TestListELResolver {
     @Test
     public void testIsReadOnly04() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
         List<String> unmodifiableList = Collections.unmodifiableList(list);
-        boolean result = resolver.isReadOnly(context, unmodifiableList,
-                Integer.valueOf(0));
+        boolean result = resolver.isReadOnly(context, unmodifiableList, Integer.valueOf(0));
 
         Assert.assertTrue(result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -317,8 +297,7 @@ public class TestListELResolver {
     @Test(expected = PropertyNotFoundException.class)
     public void testIsReadOnly05() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -331,8 +310,7 @@ public class TestListELResolver {
     @Test
     public void testIsReadOnly06() {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         List<String> list = new ArrayList<>();
         list.add("key");
@@ -349,30 +327,28 @@ public class TestListELResolver {
         Assert.assertTrue(context.isPropertyResolved());
     }
 
-    private void doNegativeTest(Object base, Object trigger,
-            MethodUnderTest method, boolean checkResult) {
+    private void doNegativeTest(Object base, Object trigger, MethodUnderTest method, boolean checkResult) {
         ListELResolver resolver = new ListELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = null;
         switch (method) {
-        case GET_VALUE: {
-            result = resolver.getValue(context, base, trigger);
-            break;
-        }
-        case SET_VALUE: {
-            resolver.setValue(context, base, trigger, new Object());
-            break;
-        }
-        case GET_TYPE: {
-            result = resolver.getType(context, base, trigger);
-            break;
-        }
-        default: {
-            // Should never happen
-            Assert.fail("Missing case for method");
-        }
+            case GET_VALUE: {
+                result = resolver.getValue(context, base, trigger);
+                break;
+            }
+            case SET_VALUE: {
+                resolver.setValue(context, base, trigger, new Object());
+                break;
+            }
+            case GET_TYPE: {
+                result = resolver.getType(context, base, trigger);
+                break;
+            }
+            default: {
+                // Should never happen
+                Assert.fail("Missing case for method");
+            }
         }
 
         if (checkResult) {
@@ -382,7 +358,9 @@ public class TestListELResolver {
     }
 
     private enum MethodUnderTest {
-        GET_VALUE, SET_VALUE, GET_TYPE
+        GET_VALUE,
+        SET_VALUE,
+        GET_TYPE
     }
 
 }
diff --git a/test/jakarta/el/TestMapELResolver.java b/test/jakarta/el/TestMapELResolver.java
index d776f5d8b2..3de333902f 100644
--- a/test/jakarta/el/TestMapELResolver.java
+++ b/test/jakarta/el/TestMapELResolver.java
@@ -39,8 +39,7 @@ public class TestMapELResolver {
      */
     @Test
     public void testGetType02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE, true);
     }
 
     /**
@@ -49,11 +48,9 @@ public class TestMapELResolver {
     @Test
     public void testGetType03() {
         MapELResolver mapELResolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Class<?> result = mapELResolver.getType(context, new HashMap<>(),
-                "test");
+        Class<?> result = mapELResolver.getType(context, new HashMap<>(), "test");
 
         Assert.assertEquals(Object.class, result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -73,8 +70,7 @@ public class TestMapELResolver {
      */
     @Test
     public void testGetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE, true);
     }
 
     /**
@@ -83,8 +79,7 @@ public class TestMapELResolver {
     @Test
     public void testGetValue03() {
         MapELResolver mapELResolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Map<String, String> map = new HashMap<>();
         map.put("key", "value");
@@ -113,8 +108,7 @@ public class TestMapELResolver {
      */
     @Test
     public void testSetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE,
-                false);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE, false);
     }
 
     /**
@@ -123,11 +117,9 @@ public class TestMapELResolver {
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue03() {
         MapELResolver mapELResolver = new MapELResolver(true);
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        mapELResolver.setValue(context, new HashMap<>(), new Object(),
-                new Object());
+        mapELResolver.setValue(context, new HashMap<>(), new Object(), new Object());
     }
 
     /**
@@ -136,14 +128,12 @@ public class TestMapELResolver {
     @Test
     public void testSetValue04() {
         MapELResolver mapELResolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Map<String, String> map = new HashMap<>();
         mapELResolver.setValue(context, map, "key", "value");
 
-        Assert.assertEquals("value",
-                mapELResolver.getValue(context, map, "key"));
+        Assert.assertEquals("value", mapELResolver.getValue(context, map, "key"));
         Assert.assertTrue(context.isPropertyResolved());
     }
 
@@ -153,8 +143,7 @@ public class TestMapELResolver {
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue05() {
         MapELResolver mapELResolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Map<Object, Object> map = Collections.unmodifiableMap(new HashMap<>());
         mapELResolver.setValue(context, map, "key", "value");
@@ -175,11 +164,9 @@ public class TestMapELResolver {
     @Test
     public void testIsReadOnly02() {
         MapELResolver mapELResolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = mapELResolver.isReadOnly(context, new Object(),
-                new Object());
+        boolean result = mapELResolver.isReadOnly(context, new Object(), new Object());
 
         Assert.assertFalse(result);
         Assert.assertFalse(context.isPropertyResolved());
@@ -193,25 +180,21 @@ public class TestMapELResolver {
     }
 
     /**
-     * Tests that if the MapELResolver is constructed with readOnly the method
-     * will return always true, otherwise false.
+     * Tests that if the MapELResolver is constructed with readOnly the method will return always true, otherwise false.
      */
     @Test
     public void testIsReadOnly03() {
         MapELResolver mapELResolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = mapELResolver.isReadOnly(context, new HashMap<>(),
-                new Object());
+        boolean result = mapELResolver.isReadOnly(context, new HashMap<>(), new Object());
 
         Assert.assertFalse(result);
         Assert.assertTrue(context.isPropertyResolved());
 
         mapELResolver = new MapELResolver(true);
 
-        result = mapELResolver.isReadOnly(context, new HashMap<>(),
-                new Object());
+        result = mapELResolver.isReadOnly(context, new HashMap<>(), new Object());
 
         Assert.assertTrue(result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -223,8 +206,7 @@ public class TestMapELResolver {
     @Test
     public void testIsReadOnly04() {
         MapELResolver mapELResolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Map<Object, Object> map = Collections.unmodifiableMap(new HashMap<>());
         boolean result = mapELResolver.isReadOnly(context, map, new Object());
@@ -233,30 +215,28 @@ public class TestMapELResolver {
         Assert.assertTrue(context.isPropertyResolved());
     }
 
-    private void doNegativeTest(Object base, Object trigger,
-            MethodUnderTest method, boolean checkResult) {
+    private void doNegativeTest(Object base, Object trigger, MethodUnderTest method, boolean checkResult) {
         MapELResolver resolver = new MapELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = null;
         switch (method) {
-        case GET_VALUE: {
-            result = resolver.getValue(context, base, trigger);
-            break;
-        }
-        case SET_VALUE: {
-            resolver.setValue(context, base, trigger, new Object());
-            break;
-        }
-        case GET_TYPE: {
-            result = resolver.getType(context, base, trigger);
-            break;
-        }
-        default: {
-            // Should never happen
-            Assert.fail("Missing case for method");
-        }
+            case GET_VALUE: {
+                result = resolver.getValue(context, base, trigger);
+                break;
+            }
+            case SET_VALUE: {
+                resolver.setValue(context, base, trigger, new Object());
+                break;
+            }
+            case GET_TYPE: {
+                result = resolver.getType(context, base, trigger);
+                break;
+            }
+            default: {
+                // Should never happen
+                Assert.fail("Missing case for method");
+            }
         }
 
         if (checkResult) {
@@ -266,6 +246,8 @@ public class TestMapELResolver {
     }
 
     private enum MethodUnderTest {
-        GET_VALUE, SET_VALUE, GET_TYPE
+        GET_VALUE,
+        SET_VALUE,
+        GET_TYPE
     }
 }
diff --git a/test/jakarta/el/TestResourceBundleELResolver.java b/test/jakarta/el/TestResourceBundleELResolver.java
index 3c5381bc67..9ebc5f7e25 100644
--- a/test/jakarta/el/TestResourceBundleELResolver.java
+++ b/test/jakarta/el/TestResourceBundleELResolver.java
@@ -34,15 +34,12 @@ public class TestResourceBundleELResolver {
 
         ResourceBundle rb = new TesterResourceBundle();
 
-        ValueExpression var = factory.createValueExpression(rb,
-                ResourceBundle.class);
+        ValueExpression var = factory.createValueExpression(rb, ResourceBundle.class);
         context.getVariableMapper().setVariable("rb", var);
 
-        ValueExpression ve = factory.createValueExpression(context,
-                "${rb.keys}", String.class);
+        ValueExpression ve = factory.createValueExpression(context, "${rb.keys}", String.class);
 
-        MethodExpression me = factory.createMethodExpression(context,
-                "${rb.getKeys()}", Enumeration.class, null);
+        MethodExpression me = factory.createMethodExpression(context, "${rb.getKeys()}", Enumeration.class, null);
 
         // Ensure we are specification compliant
         String result1 = (String) ve.getValue(context);
@@ -78,13 +75,11 @@ public class TestResourceBundleELResolver {
     }
 
     /**
-     * Tests that a valid property is not resolved if base is not
-     * ResourceBundle.
+     * Tests that a valid property is not resolved if base is not ResourceBundle.
      */
     @Test
     public void testGetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE, true);
     }
 
     /**
@@ -93,8 +88,7 @@ public class TestResourceBundleELResolver {
     @Test
     public void testGetValue03() {
         ResourceBundleELResolver resolver = new ResourceBundleELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         ResourceBundle resourceBundle = new TesterResourceBundle();
         Object result = resolver.getValue(context, resourceBundle, "key1");
@@ -123,24 +117,20 @@ public class TestResourceBundleELResolver {
     }
 
     /**
-     * Tests that a valid property is not resolved if base is not
-     * ResourceBundle.
+     * Tests that a valid property is not resolved if base is not ResourceBundle.
      */
     @Test
     public void testGetType02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE,
-                true);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE, true);
     }
 
     /**
-     * Tests that null will be returned when base is ResourceBundle. Checks that
-     * the propertyResolved is true.
+     * Tests that null will be returned when base is ResourceBundle. Checks that the propertyResolved is true.
      */
     @Test
     public void testGetType03() {
         ResourceBundleELResolver resolver = new ResourceBundleELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         ResourceBundle resourceBundle = new TesterResourceBundle();
         Class<?> result = resolver.getType(context, resourceBundle, "key1");
@@ -163,8 +153,7 @@ public class TestResourceBundleELResolver {
      */
     @Test
     public void testSetValue02() {
-        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE,
-                false);
+        doNegativeTest(new Object(), new Object(), MethodUnderTest.SET_VALUE, false);
     }
 
     /**
@@ -173,8 +162,7 @@ public class TestResourceBundleELResolver {
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue03() {
         ResourceBundleELResolver resolver = new ResourceBundleELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         ResourceBundle resourceBundle = new TesterResourceBundle();
         resolver.setValue(context, resourceBundle, new Object(), new Object());
@@ -190,17 +178,14 @@ public class TestResourceBundleELResolver {
     }
 
     /**
-     * Tests that the propertyResolved is false and readOnly is false if base is
-     * not ResourceBundle.
+     * Tests that the propertyResolved is false and readOnly is false if base is not ResourceBundle.
      */
     @Test
     public void testIsReadOnly02() {
         ResourceBundleELResolver resolver = new ResourceBundleELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = resolver.isReadOnly(context, new Object(),
-                new Object());
+        boolean result = resolver.isReadOnly(context, new Object(), new Object());
 
         Assert.assertFalse(result);
         Assert.assertFalse(context.isPropertyResolved());
@@ -212,12 +197,10 @@ public class TestResourceBundleELResolver {
     @Test
     public void testIsReadOnly03() {
         ResourceBundleELResolver resolver = new ResourceBundleELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         ResourceBundle resourceBundle = new TesterResourceBundle();
-        boolean result = resolver.isReadOnly(context, resourceBundle,
-                new Object());
+        boolean result = resolver.isReadOnly(context, resourceBundle, new Object());
 
         Assert.assertTrue(result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -241,30 +224,28 @@ public class TestResourceBundleELResolver {
         private Object[][] contents;
     }
 
-    private void doNegativeTest(Object base, Object trigger,
-            MethodUnderTest method, boolean checkResult) {
+    private void doNegativeTest(Object base, Object trigger, MethodUnderTest method, boolean checkResult) {
         ResourceBundleELResolver resolver = new ResourceBundleELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = null;
         switch (method) {
-        case GET_VALUE: {
-            result = resolver.getValue(context, base, trigger);
-            break;
-        }
-        case SET_VALUE: {
-            resolver.setValue(context, base, trigger, new Object());
-            break;
-        }
-        case GET_TYPE: {
-            result = resolver.getType(context, base, trigger);
-            break;
-        }
-        default: {
-            // Should never happen
-            Assert.fail("Missing case for method");
-        }
+            case GET_VALUE: {
+                result = resolver.getValue(context, base, trigger);
+                break;
+            }
+            case SET_VALUE: {
+                resolver.setValue(context, base, trigger, new Object());
+                break;
+            }
+            case GET_TYPE: {
+                result = resolver.getType(context, base, trigger);
+                break;
+            }
+            default: {
+                // Should never happen
+                Assert.fail("Missing case for method");
+            }
         }
 
         if (checkResult) {
@@ -274,6 +255,8 @@ public class TestResourceBundleELResolver {
     }
 
     private enum MethodUnderTest {
-        GET_VALUE, SET_VALUE, GET_TYPE
+        GET_VALUE,
+        SET_VALUE,
+        GET_TYPE
     }
 }
diff --git a/test/jakarta/el/TestStaticFieldELResolver.java b/test/jakarta/el/TestStaticFieldELResolver.java
index 006d737c7f..d55ebd7cde 100644
--- a/test/jakarta/el/TestStaticFieldELResolver.java
+++ b/test/jakarta/el/TestStaticFieldELResolver.java
@@ -47,11 +47,9 @@ public class TestStaticFieldELResolver {
     @Test
     public void testGetValue02() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.getValue(context, new ELClass(
-                TesterClass.class), PROPERTY01_NAME);
+        Object result = resolver.getValue(context, new ELClass(TesterClass.class), PROPERTY01_NAME);
 
         Assert.assertEquals(PROPERTY01_NAME, result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -70,8 +68,7 @@ public class TestStaticFieldELResolver {
      */
     @Test
     public void testGetValue04() {
-        doNegativeTest(new ELClass(TesterClass.class), new Object(),
-                MethodUnderTest.GET_VALUE);
+        doNegativeTest(new ELClass(TesterClass.class), new Object(), MethodUnderTest.GET_VALUE);
     }
 
     /**
@@ -112,11 +109,10 @@ public class TestStaticFieldELResolver {
     @Test
     public void testGetValue09() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.getValue(context, new ELClass(
-                MethodUnderTest.class), MethodUnderTest.GET_TYPE.toString());
+        Object result = resolver.getValue(context, new ELClass(MethodUnderTest.class),
+                MethodUnderTest.GET_TYPE.toString());
 
         Assert.assertEquals(MethodUnderTest.GET_TYPE, result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -137,11 +133,9 @@ public class TestStaticFieldELResolver {
     @Test(expected = PropertyNotWritableException.class)
     public void testSetValue02() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        resolver.setValue(context, new ELClass(TesterClass.class),
-                PROPERTY01_NAME, PROPERTY01_VALUE);
+        resolver.setValue(context, new ELClass(TesterClass.class), PROPERTY01_NAME, PROPERTY01_VALUE);
     }
 
     /**
@@ -157,8 +151,7 @@ public class TestStaticFieldELResolver {
      */
     @Test
     public void testSetValue04() {
-        doNegativeTest(new ELClass(TesterClass.class), new Object(),
-                MethodUnderTest.SET_VALUE);
+        doNegativeTest(new ELClass(TesterClass.class), new Object(), MethodUnderTest.SET_VALUE);
     }
 
     /**
@@ -171,17 +164,14 @@ public class TestStaticFieldELResolver {
     }
 
     /**
-     * Tests that the propertyResolved is true when base is ELCLass and the
-     * property is String.
+     * Tests that the propertyResolved is true when base is ELCLass and the property is String.
      */
     @Test
     public void testIsReadOnly02() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = resolver.isReadOnly(context, new ELClass(
-                TesterClass.class), PROPERTY01_NAME);
+        boolean result = resolver.isReadOnly(context, new ELClass(TesterClass.class), PROPERTY01_NAME);
 
         Assert.assertTrue(result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -193,11 +183,9 @@ public class TestStaticFieldELResolver {
     @Test
     public void testIsReadOnly03() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = resolver.isReadOnly(context, new Object(),
-                PROPERTY01_NAME);
+        boolean result = resolver.isReadOnly(context, new Object(), PROPERTY01_NAME);
 
         Assert.assertTrue(result);
         Assert.assertFalse(context.isPropertyResolved());
@@ -209,11 +197,9 @@ public class TestStaticFieldELResolver {
     @Test
     public void testIsReadOnly04() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        boolean result = resolver.isReadOnly(context, new ELClass(
-                TesterClass.class), new Object());
+        boolean result = resolver.isReadOnly(context, new ELClass(TesterClass.class), new Object());
 
         Assert.assertTrue(result);
         Assert.assertFalse(context.isPropertyResolved());
@@ -234,11 +220,9 @@ public class TestStaticFieldELResolver {
     @Test
     public void testGetType02() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Class<?> result = resolver.getType(context, new ELClass(
-                TesterClass.class), PROPERTY01_NAME);
+        Class<?> result = resolver.getType(context, new ELClass(TesterClass.class), PROPERTY01_NAME);
 
         // Resolver is read-only so this should return null
         Assert.assertNull(result);
@@ -257,8 +241,7 @@ public class TestStaticFieldELResolver {
      */
     @Test
     public void testGetType04() {
-        doNegativeTest(new ELClass(TesterClass.class), new Object(),
-                MethodUnderTest.GET_TYPE);
+        doNegativeTest(new ELClass(TesterClass.class), new Object(), MethodUnderTest.GET_TYPE);
     }
 
     /**
@@ -299,11 +282,10 @@ public class TestStaticFieldELResolver {
     @Test
     public void testGetType09() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Class<?> result = resolver.getType(context, new ELClass(
-                MethodUnderTest.class), MethodUnderTest.GET_TYPE.toString());
+        Class<?> result = resolver.getType(context, new ELClass(MethodUnderTest.class),
+                MethodUnderTest.GET_TYPE.toString());
 
         // Resolver is read-only so this should return null
         Assert.assertNull(result);
@@ -315,8 +297,7 @@ public class TestStaticFieldELResolver {
     @Test(expected = NullPointerException.class)
     public void testInvoke01() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        resolver.invoke(null, new Object(), new Object(), new Class<?>[] {},
-                new Object[] {});
+        resolver.invoke(null, new Object(), new Object(), new Class<?>[] {}, new Object[] {});
     }
 
     /**
@@ -325,11 +306,9 @@ public class TestStaticFieldELResolver {
     @Test
     public void testInvoke02() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context,
-                new ELClass(TesterClass.class), METHOD01_NAME, null, null);
+        Object result = resolver.invoke(context, new ELClass(TesterClass.class), METHOD01_NAME, null, null);
 
         Assert.assertEquals(TesterClass.class, result.getClass());
         Assert.assertTrue(context.isPropertyResolved());
@@ -341,12 +320,10 @@ public class TestStaticFieldELResolver {
     @Test
     public void testInvoke03() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context,
-                new ELClass(TesterClass.class), METHOD02_NAME,
-                new Class<?>[] {}, new Object[] {});
+        Object result = resolver.invoke(context, new ELClass(TesterClass.class), METHOD02_NAME, new Class<?>[] {},
+                new Object[] {});
 
         Assert.assertEquals(PROPERTY01_NAME, result);
         Assert.assertTrue(context.isPropertyResolved());
@@ -365,8 +342,7 @@ public class TestStaticFieldELResolver {
      */
     @Test
     public void testInvoke05() {
-        doNegativeTest(new ELClass(TesterClass.class), new Object(),
-                MethodUnderTest.INVOKE);
+        doNegativeTest(new ELClass(TesterClass.class), new Object(), MethodUnderTest.INVOKE);
     }
 
     /**
@@ -391,75 +367,36 @@ public class TestStaticFieldELResolver {
     @Test
     public void testInvoke08() {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
-        Object result = resolver.invoke(context,
-                new ELClass(TesterClass.class), METHOD04_NAME,
-                new Class<?>[] {}, new Object[] {});
+        Object result = resolver.invoke(context, new ELClass(TesterClass.class), METHOD04_NAME, new Class<?>[] {},
+                new Object[] {});
 
         Assert.assertNull(result);
         Assert.assertTrue(context.isPropertyResolved());
     }
 
-    private void doNegativeTest(Object elClass, Object trigger,
-            MethodUnderTest method) {
+    private void doNegativeTest(Object elClass, Object trigger, MethodUnderTest method) {
         StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
 
         Object result = null;
         switch (method) {
-        case GET_VALUE: {
-            result = resolver.getValue(context, elClass, trigger);
-            break;
-        }
-        case SET_VALUE: {
-            resolver.setValue(context, elClass, trigger, PROPERTY01_VALUE);
-            result = resolver.getValue(context, elClass, trigger);
-            break;
-        }
-        case GET_TYPE: {
-            result = resolver.getType(context, elClass, trigger);
-            break;
-        }
-        case INVOKE: {
-            result = resolver.invoke(context, elClass, trigger,
-                    new Class<?>[] { String.class }, new Object[] { "test" });
-            break;
-        }
-        default: {
-            // Should never happen
-            Assert.fail("Missing case for method");
-        }
-        }
-
-        Assert.assertNull(result);
-        Assert.assertFalse(context.isPropertyResolved());
-    }
-
-    private void doThrowableTest(String trigger, MethodUnderTest method,
-            boolean checkCause) {
-        StaticFieldELResolver resolver = new StaticFieldELResolver();
-        ELContext context = new StandardELContext(
-                ELManager.getExpressionFactory());
-
-        ELException exception = null;
-        try {
-            switch (method) {
             case GET_VALUE: {
-                resolver.getValue(context, new ELClass(TesterClass.class),
-                        trigger);
+                result = resolver.getValue(context, elClass, trigger);
+                break;
+            }
+            case SET_VALUE: {
+                resolver.setValue(context, elClass, trigger, PROPERTY01_VALUE);
+                result = resolver.getValue(context, elClass, trigger);
                 break;
             }
             case GET_TYPE: {
-                resolver.getType(context, new ELClass(TesterClass.class),
-                        trigger);
+                result = resolver.getType(context, elClass, trigger);
                 break;
             }
             case INVOKE: {
-                resolver.invoke(context, new ELClass(TesterClass.class),
-                        trigger, new Class<?>[] { String.class },
+                result = resolver.invoke(context, elClass, trigger, new Class<?>[] { String.class },
                         new Object[] { "test" });
                 break;
             }
@@ -467,6 +404,36 @@ public class TestStaticFieldELResolver {
                 // Should never happen
                 Assert.fail("Missing case for method");
             }
+        }
+
+        Assert.assertNull(result);
+        Assert.assertFalse(context.isPropertyResolved());
+    }
+
+    private void doThrowableTest(String trigger, MethodUnderTest method, boolean checkCause) {
+        StaticFieldELResolver resolver = new StaticFieldELResolver();
+        ELContext context = new StandardELContext(ELManager.getExpressionFactory());
+
+        ELException exception = null;
+        try {
+            switch (method) {
+                case GET_VALUE: {
+                    resolver.getValue(context, new ELClass(TesterClass.class), trigger);
+                    break;
+                }
+                case GET_TYPE: {
+                    resolver.getType(context, new ELClass(TesterClass.class), trigger);
+                    break;
+                }
+                case INVOKE: {
+                    resolver.invoke(context, new ELClass(TesterClass.class), trigger, new Class<?>[] { String.class },
+                            new Object[] { "test" });
+                    break;
+                }
+                default: {
+                    // Should never happen
+                    Assert.fail("Missing case for method");
+                }
             }
 
         } catch (PropertyNotFoundException | MethodNotFoundException e) {
@@ -484,6 +451,9 @@ public class TestStaticFieldELResolver {
     }
 
     private enum MethodUnderTest {
-        GET_VALUE, SET_VALUE, GET_TYPE, INVOKE
+        GET_VALUE,
+        SET_VALUE,
+        GET_TYPE,
+        INVOKE
     }
 }
diff --git a/test/jakarta/el/TesterBean.java b/test/jakarta/el/TesterBean.java
index 8f0d1e4e31..25d46c0245 100644
--- a/test/jakarta/el/TesterBean.java
+++ b/test/jakarta/el/TesterBean.java
@@ -54,7 +54,7 @@ public class TesterBean {
     }
 
     public int[] getValueB() {
-        return new int[] {1,2,3,4,5};
+        return new int[] { 1, 2, 3, 4, 5 };
     }
 
     public void setValueC(Integer[] values) {
diff --git a/test/jakarta/el/TesterBeanNameResolver.java b/test/jakarta/el/TesterBeanNameResolver.java
index 3fb2b7644f..e04fd44884 100644
--- a/test/jakarta/el/TesterBeanNameResolver.java
+++ b/test/jakarta/el/TesterBeanNameResolver.java
@@ -25,7 +25,7 @@ public class TesterBeanNameResolver extends BeanNameResolver {
     public static final String THROWABLE_TRIGGER_NAME = "throwable";
     public static final String READ_ONLY_NAME = "readonly";
 
-    private Map<String,Object> beans = new HashMap<>();
+    private Map<String, Object> beans = new HashMap<>();
     private boolean allowCreate = true;
 
 
@@ -36,8 +36,7 @@ public class TesterBeanNameResolver extends BeanNameResolver {
     }
 
     @Override
-    public void setBeanValue(String beanName, Object value)
-            throws PropertyNotWritableException {
+    public void setBeanValue(String beanName, Object value) throws PropertyNotWritableException {
         checkTriggers(beanName);
         if (allowCreate || beans.containsKey(beanName)) {
             beans.put(beanName, value);
diff --git a/test/jakarta/el/TesterEvaluationListener.java b/test/jakarta/el/TesterEvaluationListener.java
index 5ba0a07587..ba60b976d6 100644
--- a/test/jakarta/el/TesterEvaluationListener.java
+++ b/test/jakarta/el/TesterEvaluationListener.java
@@ -27,8 +27,7 @@ public class TesterEvaluationListener extends EvaluationListener {
 
 
     @Override
-    public void propertyResolved(ELContext context, Object base,
-            Object property) {
+    public void propertyResolved(ELContext context, Object base, Object property) {
         resolvedProperties.add(new Pair(base, property));
     }
 
diff --git a/test/jakarta/el/TesterImportHandlerPerformance.java b/test/jakarta/el/TesterImportHandlerPerformance.java
index 4c97c839ef..c2c267c851 100644
--- a/test/jakarta/el/TesterImportHandlerPerformance.java
+++ b/test/jakarta/el/TesterImportHandlerPerformance.java
@@ -21,15 +21,11 @@ import org.junit.Test;
 public class TesterImportHandlerPerformance {
 
     /*
-     * This test is looking at the cost of looking up a class when the standard
-     * JSP package imports are present:
-     * - java.lang
-     * - jakarta.servlet
-     * - jakarta.servlet.http
-     * - jakarta.servlet.jsp
+     * This test is looking at the cost of looking up a class when the standard JSP package imports are present: -
+     * java.lang - jakarta.servlet - jakarta.servlet.http - jakarta.servlet.jsp
      *
-     * Before optimisation, this test took ~4.6s on markt's desktop
-     * After optimisation, this test took ~0.05s on markt's desktop
+     * Before optimisation, this test took ~4.6s on markt's desktop After optimisation, this test took ~0.05s on markt's
+     * desktop
      */
     @Test
     public void testBug62453() throws Exception {
@@ -42,7 +38,7 @@ public class TesterImportHandlerPerformance {
             long start = System.nanoTime();
             ih.resolveClass("unknown");
             long end = System.nanoTime();
-            totalTime += (end -start);
+            totalTime += (end - start);
         }
         System.out.println("Time taken: " + totalTime + "ns");
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 04/06: Refactor to make testing BeanSupport implementations easier

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 8588fa9c34b4b2307f69b9796797675c6d0183d1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 22 17:12:43 2023 +0000

    Refactor to make testing BeanSupport implementations easier
---
 java/jakarta/el/BeanSupport.java                   | 18 +++++-
 test/jakarta/el/ELBaseTest.java                    | 69 ++++++++++++++++++++++
 ...anSupportBaseTest.java => TestBeanSupport.java} |  2 +-
 test/jakarta/el/TestBeanSupportFull.java           | 29 ---------
 test/jakarta/el/TestBeanSupportStandalone.java     | 34 -----------
 5 files changed, 86 insertions(+), 66 deletions(-)

diff --git a/java/jakarta/el/BeanSupport.java b/java/jakarta/el/BeanSupport.java
index fdd60e596e..ee6dc7001d 100644
--- a/java/jakarta/el/BeanSupport.java
+++ b/java/jakarta/el/BeanSupport.java
@@ -27,6 +27,17 @@ abstract class BeanSupport {
     private static final BeanSupport beanSupport;
 
     static {
+        // Only intended for unit tests. Not intended to be part of public API.
+        boolean doNotCacheInstance = Boolean.getBoolean("jakarta.el.BeanSupport.doNotCacheInstance");
+        if (doNotCacheInstance) {
+            beanSupport = null;
+        } else {
+            beanSupport = createInstance();
+        }
+    }
+
+    private static BeanSupport createInstance() {
+        // Only intended for unit tests. Not intended to be part of public API.
         boolean useFull = !Boolean.getBoolean("jakarta.el.BeanSupport.useStandalone");
 
         if (useFull) {
@@ -40,14 +51,17 @@ abstract class BeanSupport {
         }
         if (useFull) {
             // The full implementation provided by the java.beans package
-            beanSupport = new BeanSupportFull();
+            return new BeanSupportFull();
         } else {
             // The cut-down local implementation that does not depend on the java.beans package
-            beanSupport = new BeanSupportStandalone();
+            return new BeanSupportStandalone();
         }
     }
 
     static BeanSupport getInstance() {
+        if (beanSupport == null) {
+            return createInstance();
+        }
         return beanSupport;
     }
 
diff --git a/test/jakarta/el/ELBaseTest.java b/test/jakarta/el/ELBaseTest.java
new file mode 100644
index 0000000000..79e262a220
--- /dev/null
+++ b/test/jakarta/el/ELBaseTest.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.el;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameter;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * Base class for tests that (indirectly) use BeanSupport and want to test both implementations.
+ */
+@RunWith(Parameterized.class)
+public abstract class ELBaseTest {
+
+    @Parameters(name = "{index}: useStandalone[{0}]")
+    public static Collection<Object[]> data() {
+        List<Object[]> parameterSets = new ArrayList<>();
+
+        parameterSets.add(new Object[] { Boolean.FALSE });
+        parameterSets.add(new Object[] { Boolean.TRUE });
+
+        return parameterSets;
+    }
+
+    @Parameter(0)
+    public boolean useStandalone;
+
+    @Before
+    public void setup() {
+        // Disable caching so we can switch implementations within a JVM instance.
+        System.setProperty("jakarta.el.BeanSupport.doNotCacheInstance", "true");
+        // Set up the implementation for this test run
+        System.setProperty("jakarta.el.BeanSupport.useStandalone", Boolean.toString(useStandalone));
+    }
+
+    /*
+     * Double check test has been configured as expected
+     */
+    @Test
+    public void testImplementation() {
+        if (useStandalone) {
+            Assert.assertEquals(BeanSupportStandalone.class, BeanSupport.getInstance().getClass());
+        } else {
+            Assert.assertEquals(BeanSupportFull.class, BeanSupport.getInstance().getClass());
+        }
+    }
+}
diff --git a/test/jakarta/el/BeanSupportBaseTest.java b/test/jakarta/el/TestBeanSupport.java
similarity index 99%
rename from test/jakarta/el/BeanSupportBaseTest.java
rename to test/jakarta/el/TestBeanSupport.java
index e594811052..0807a90dce 100644
--- a/test/jakarta/el/BeanSupportBaseTest.java
+++ b/test/jakarta/el/TestBeanSupport.java
@@ -22,7 +22,7 @@ import jakarta.el.BeanELResolver.BeanProperty;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class BeanSupportBaseTest {
+public class TestBeanSupport extends ELBaseTest {
 
     @Test
     public void testSimpleBean() {
diff --git a/test/jakarta/el/TestBeanSupportFull.java b/test/jakarta/el/TestBeanSupportFull.java
deleted file mode 100644
index e8a5d1323c..0000000000
--- a/test/jakarta/el/TestBeanSupportFull.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package jakarta.el;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestBeanSupportFull extends BeanSupportBaseTest {
-
-    @Test
-    public void testImplementationClass() {
-        Assert.assertTrue(BeanSupport.getInstance() instanceof BeanSupportFull);
-    }
-
-}
diff --git a/test/jakarta/el/TestBeanSupportStandalone.java b/test/jakarta/el/TestBeanSupportStandalone.java
deleted file mode 100644
index ebb97a9158..0000000000
--- a/test/jakarta/el/TestBeanSupportStandalone.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package jakarta.el;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestBeanSupportStandalone extends BeanSupportBaseTest {
-
-    @Before
-    public void setup() {
-        System.setProperty("jakarta.el.BeanSupport.useStandalone", "true");
-    }
-
-    @Test
-    public void testImplementationClass() {
-        Assert.assertTrue(BeanSupport.getInstance() instanceof BeanSupportStandalone);
-    }
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org