diff --git a/pom.xml b/pom.xml index 9a4c2f4ea..b600faada 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,8 @@ 3.24.1-GA 0.8.3 + 31.1-jre + 2.19.1 --add-opens=java.base/java.lang=ALL-UNNAMED diff --git a/src/main/java/com/hubspot/jinjava/lib/tag/eager/EagerTagFactory.java b/src/main/java/com/hubspot/jinjava/lib/tag/eager/EagerTagFactory.java index 6793c125c..b6321dc50 100644 --- a/src/main/java/com/hubspot/jinjava/lib/tag/eager/EagerTagFactory.java +++ b/src/main/java/com/hubspot/jinjava/lib/tag/eager/EagerTagFactory.java @@ -63,9 +63,11 @@ public static Optional> getEagerTagDecorato if (TAG_CLASSES_TO_SKIP.contains(clazz)) { return Optional.empty(); } - if (EAGER_TAG_OVERRIDES.containsKey(clazz)) { - EagerTagDecorator decorator = EAGER_TAG_OVERRIDES - .get(clazz) + Class> eagerOverrideClass = EAGER_TAG_OVERRIDES.get( + clazz + ); + if (eagerOverrideClass != null) { + EagerTagDecorator decorator = eagerOverrideClass .getDeclaredConstructor(clazz) .newInstance(tag); if (decorator.getTag().getClass() == clazz) {