From 671c984e9bcee2b1651d5fa96b5c670da5802822 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 23 Mar 2022 15:23:05 -0700 Subject: [PATCH 1/2] Replace @Deprecated Jackson method calls with supported replacement methods * getGenericType is removed completely in Jackson 2.11 * This fix allows Druid to compile with Jackson 2.12+ as well as for existing distributions to replace version 2.10 with 2.12 at runtime. --- .../org/apache/druid/guice/GuiceAnnotationIntrospector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java b/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java index ce49253e0ffb..c720994c5416 100644 --- a/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java +++ b/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java @@ -58,9 +58,9 @@ public Object findInjectableValueId(AnnotatedMember m) if (m instanceof AnnotatedMethod) { throw new IAE("Annotated methods don't work very well yet..."); } - return Key.get(m.getGenericType()); + return Key.get(m.getRawType()); } - return Key.get(m.getGenericType(), guiceAnnotation); + return Key.get(m.getRawType(), guiceAnnotation); } /** From 156403e7175584448378e827f5a439feb1b3b633 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 4 Apr 2022 11:32:44 -0700 Subject: [PATCH 2/2] Swap to method replacement indicated by javadoc instead of callsite --- .../org/apache/druid/guice/GuiceAnnotationIntrospector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java b/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java index c720994c5416..1f1a20d43f99 100644 --- a/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java +++ b/core/src/main/java/org/apache/druid/guice/GuiceAnnotationIntrospector.java @@ -58,9 +58,9 @@ public Object findInjectableValueId(AnnotatedMember m) if (m instanceof AnnotatedMethod) { throw new IAE("Annotated methods don't work very well yet..."); } - return Key.get(m.getRawType()); + return Key.get(m.getType()); } - return Key.get(m.getRawType(), guiceAnnotation); + return Key.get(m.getType(), guiceAnnotation); } /**