Skip to content

Commit 36b3d47

Browse files
committed
...
1 parent 1fd48f5 commit 36b3d47

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/main/java/tools/jackson/databind/type/TypeFactory.java

+4-8
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ public ClassLoader getClassLoader() {
277277
* <code>java.lang.Object</code>.
278278
*/
279279
public static JavaType unknownType() {
280-
// 11-Oct-2024, tatu: Used to call via "defaultInstance()" pre-2.19 but
281-
// since we have static object to refer, just return directly
282280
return CORE_TYPE_OBJECT;
283281
}
284282

@@ -302,8 +300,10 @@ public static Class<?> rawClass(Type t) {
302300
} else if (t instanceof WildcardType) {
303301
return rawClass(((WildcardType) t).getUpperBounds()[0]);
304302
}
305-
// fallback
306-
return defaultInstance().constructType(t).getRawClass();
303+
// 11-Oct-2024, tatu: In 2.x used to call `defaultInstance().constructType(t).getRawClass()`
304+
// but does not appear necessary.
305+
throw new IllegalArgumentException("Do not know how get `rawClass` out of: "
306+
+ClassUtil.classNameOf(t));
307307
}
308308

309309
/*
@@ -1212,10 +1212,6 @@ protected JavaType _newSimpleType(Class<?> raw, TypeBindings bindings,
12121212
return new SimpleType(raw, bindings, superClass, superInterfaces);
12131213
}
12141214

1215-
/**
1216-
* @deprecated Since 2.19
1217-
*/
1218-
@Deprecated // since 2.19
12191215
protected JavaType _unknownType() {
12201216
return CORE_TYPE_OBJECT;
12211217
}

0 commit comments

Comments
 (0)