From 0001f4fda34d14e4b57a6ccc68cb49542e7d66e8 Mon Sep 17 00:00:00 2001 From: Artyom Gabeev Date: Wed, 16 Aug 2023 11:54:12 +0300 Subject: [PATCH] Cache Axiom class lookup. See #1371. --- .../springframework/ws/soap/axiom/support/AxiomUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java index 9246773f..8cbeadc3 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java @@ -46,6 +46,9 @@ import org.w3c.dom.Element; @SuppressWarnings("Since15") public final class AxiomUtils { + private static final boolean AXIOM14_PRESENT = + ClassUtils.isPresent("org.apache.axiom.om.ds.StringOMDataSource", null); + private AxiomUtils() { throw new RuntimeException("Utility class not meant to be instantiated."); } @@ -54,7 +57,7 @@ public final class AxiomUtils { * Detect if Axiom 1.4 is on the classpath. */ public static boolean AXIOM14_IS_PRESENT() { - return ClassUtils.isPresent("org.apache.axiom.om.ds.StringOMDataSource", null); + return AXIOM14_PRESENT; } /**