Skip to content

Commit 0edc2eb

Browse files
committed
Remove one more TypeFactory.defaultInstance() use case
1 parent ef217f0 commit 0edc2eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ public ClassLoader getClassLoader() {
316316
* <code>java.lang.Object</code>.
317317
*/
318318
public static JavaType unknownType() {
319-
return defaultInstance()._unknownType();
319+
// 11-Oct-2024, tatu: Used to call via "defaultInstance()" pre-2.19 but
320+
// since we have static object to refer, just return directly
321+
return CORE_TYPE_OBJECT;
320322
}
321323

322324
/**
@@ -1401,6 +1403,10 @@ protected JavaType _newSimpleType(Class<?> raw, TypeBindings bindings,
14011403
return new SimpleType(raw, bindings, superClass, superInterfaces);
14021404
}
14031405

1406+
/**
1407+
* @deprecated Since 2.19
1408+
*/
1409+
@Deprecated // since 2.19
14041410
protected JavaType _unknownType() {
14051411
/* 15-Sep-2015, tatu: Prior to 2.7, we constructed new instance for each call.
14061412
* This may have been due to potential mutability of the instance; but that

0 commit comments

Comments
 (0)