From 3ab6dc93daeb9f07e9fc7ff005caf1578fa5e0be Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Wed, 11 Oct 2023 10:20:20 -0400 Subject: [PATCH] Make private static classes final --- .../ri/model/dynabeans/StrictLazyDynaBeanPointerFactory.java | 2 +- .../java/org/apache/commons/jxpath/util/KeyManagerUtils.java | 2 +- .../java/org/apache/commons/jxpath/issues/JXPath177Test.java | 2 +- .../commons/jxpath/ri/compiler/ExtensionFunctionTest.java | 2 +- .../org/apache/commons/jxpath/util/ClassLoaderUtilTest.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/commons/jxpath/ri/model/dynabeans/StrictLazyDynaBeanPointerFactory.java b/src/main/java/org/apache/commons/jxpath/ri/model/dynabeans/StrictLazyDynaBeanPointerFactory.java index 2ded4273a..22de80fe5 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/model/dynabeans/StrictLazyDynaBeanPointerFactory.java +++ b/src/main/java/org/apache/commons/jxpath/ri/model/dynabeans/StrictLazyDynaBeanPointerFactory.java @@ -37,7 +37,7 @@ public class StrictLazyDynaBeanPointerFactory implements NodePointerFactory { /** * Pointer implementation. */ - private static class StrictLazyDynaBeanPointer extends DynaBeanPointer { + private static final class StrictLazyDynaBeanPointer extends DynaBeanPointer { private static final long serialVersionUID = 1L; private final LazyDynaBean lazyDynaBean; diff --git a/src/main/java/org/apache/commons/jxpath/util/KeyManagerUtils.java b/src/main/java/org/apache/commons/jxpath/util/KeyManagerUtils.java index 4115ff48a..76c2acab8 100644 --- a/src/main/java/org/apache/commons/jxpath/util/KeyManagerUtils.java +++ b/src/main/java/org/apache/commons/jxpath/util/KeyManagerUtils.java @@ -32,7 +32,7 @@ public class KeyManagerUtils { /** * Adapt KeyManager to implement ExtendedKeyManager. */ - private static class SingleNodeExtendedKeyManager implements + private static final class SingleNodeExtendedKeyManager implements ExtendedKeyManager { private final KeyManager delegate; diff --git a/src/test/java/org/apache/commons/jxpath/issues/JXPath177Test.java b/src/test/java/org/apache/commons/jxpath/issues/JXPath177Test.java index f3dd72794..4edab2aba 100644 --- a/src/test/java/org/apache/commons/jxpath/issues/JXPath177Test.java +++ b/src/test/java/org/apache/commons/jxpath/issues/JXPath177Test.java @@ -64,7 +64,7 @@ private void doTest(final String xp, final String expected) } - private static class JXPathVariablesResolver implements Variables + private static final class JXPathVariablesResolver implements Variables { private static final long serialVersionUID = -1106360826446119597L; diff --git a/src/test/java/org/apache/commons/jxpath/ri/compiler/ExtensionFunctionTest.java b/src/test/java/org/apache/commons/jxpath/ri/compiler/ExtensionFunctionTest.java index 7ab105e9f..4486d8250 100644 --- a/src/test/java/org/apache/commons/jxpath/ri/compiler/ExtensionFunctionTest.java +++ b/src/test/java/org/apache/commons/jxpath/ri/compiler/ExtensionFunctionTest.java @@ -384,7 +384,7 @@ public void testBCNodeSetHack() { Boolean.TRUE); } - private static class Context implements ExpressionContext { + private static final class Context implements ExpressionContext { private final Object object; public Context(final Object object) { diff --git a/src/test/java/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java b/src/test/java/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java index f6dc4e85b..eb62b7bfd 100644 --- a/src/test/java/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java +++ b/src/test/java/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java @@ -171,7 +171,7 @@ private void executeTestMethodUnderClassLoader(final ClassLoader cl, final Strin * whether the parent can/has loaded it. * */ - private static class TestClassLoader extends ClassLoader { + private static final class TestClassLoader extends ClassLoader { private Class testCaseClass = null; public TestClassLoader(final ClassLoader classLoader) {