From 2b4ed0911eff53e809f63dc6a7ed769d958e0100 Mon Sep 17 00:00:00 2001 From: Mike Weber Date: Wed, 12 Feb 2025 20:47:16 -0500 Subject: [PATCH 1/2] Fixed Javadoc example for constructParametricType(Class, Class...) --- .../com/fasterxml/jackson/databind/type/TypeFactory.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java b/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java index fe97a64e09..87e5a0f5a2 100644 --- a/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java +++ b/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java @@ -1123,11 +1123,10 @@ public JavaType uncheckedSimpleType(Class cls) { /** * Factory method for constructing {@link JavaType} that * represents a parameterized type. For example, to represent - * type {@code List>}, you could + * type {@code Foo}, you could * call *
-     *  JavaType inner = TypeFactory.constructParametricType(Set.class, Integer.class);
-     *  return TypeFactory.constructParametricType(List.class, inner);
+     *  return TypeFactory.constructParametricType(Foo.class, Bar.class, Baz.class);
      *
*

* NOTE: since 2.11.2 {@link TypeModifier}s ARE called on result (fix for [databind#2796]) From 854e4ab1e25f4475bedb232c4a114bdf841cb4b9 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Thu, 13 Feb 2025 14:31:12 -0800 Subject: [PATCH 2/2] Minor changes --- .../com/fasterxml/jackson/databind/type/TypeFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java b/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java index 87e5a0f5a2..f05ec87079 100644 --- a/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java +++ b/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java @@ -1126,7 +1126,7 @@ public JavaType uncheckedSimpleType(Class cls) { * type {@code Foo}, you could * call *

-     *  return TypeFactory.constructParametricType(Foo.class, Bar.class, Baz.class);
+     *  return typeFactory.constructParametricType(Foo.class, Bar.class, Baz.class);
      *
*

* NOTE: since 2.11.2 {@link TypeModifier}s ARE called on result (fix for [databind#2796]) @@ -1150,8 +1150,8 @@ public JavaType constructParametricType(Class parametrized, Class... param * represents a parameterized type. For example, to represent * type {@code List>}, you could *

-     *  JavaType inner = TypeFactory.constructParametricType(Set.class, Integer.class);
-     *  return TypeFactory.constructParametricType(List.class, inner);
+     *  JavaType inner = typeFactory.constructParametricType(Set.class, Integer.class);
+     *  return typeFactory.constructParametricType(List.class, inner);
      *
*

* NOTE: since 2.11.2 {@link TypeModifier}s ARE called on result (fix for [databind#2796]) @@ -1173,7 +1173,7 @@ public JavaType constructParametricType(Class rawType, JavaType... parameterT * is useful if you already have the type's parameters such * as those found on {@link JavaType}. For example, you could call *

-     *   return TypeFactory.constructParametricType(ArrayList.class, javaType.getBindings());
+     *   return typeFactory.constructParametricType(ArrayList.class, javaType.getBindings());
      * 
* This effectively applies the parameterized types from one * {@link JavaType} to another class.