From cedcba64c59604041b321f897f86ce9410635a7b Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Fri, 4 Aug 2023 10:50:09 -0400 Subject: [PATCH 1/3] Update guava to 31.1-jre --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 9a4c2f4ea..68b744774 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,7 @@ 3.24.1-GA 0.8.3 + 31.1-jre --add-opens=java.base/java.lang=ALL-UNNAMED From c28c28f0aabddee83da92a8efacf23e14bd519ca Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Fri, 4 Aug 2023 10:53:18 -0400 Subject: [PATCH 2/3] Update error-prone version to 2.19.1 --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 68b744774..b600faada 100644 --- a/pom.xml +++ b/pom.xml @@ -19,6 +19,7 @@ 3.24.1-GA 0.8.3 31.1-jre + 2.19.1 --add-opens=java.base/java.lang=ALL-UNNAMED From e24f9eff2cd24b4062aa2fa3cd4c1f4434cb36e5 Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Fri, 4 Aug 2023 15:28:05 -0400 Subject: [PATCH 3/3] Reorganize code in EagerTagFactory to avoid error-prone bug --- .../hubspot/jinjava/lib/tag/eager/EagerTagFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) {