Cache Axiom class lookup.

See #1371.
This commit is contained in:
Artyom Gabeev
2023-08-16 11:54:12 +03:00
committed by Greg L. Turnquist
parent 6801d9cfe9
commit 0001f4fda3

View File

@@ -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;
}
/**