Inconsistent default class loaders in hint classes #34470
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
In the various hint related classes, there's a mixture of using
ClassUtils.getDefaultClassLoader()
and the hint class's own class loader:ClassUtils.getDefaultClassLoader()
:ReflectionHints
ObjectToObjectConverterRuntimeHints
(delegates toReflectionHints
)getClass().getClassLoader()
:FilePatternResourceHintsRegistrar
ResourceHints
SpringFactoriesLoaderRuntimeHints
For consistency, I think the same default class loader should be used. My preference would be to use
ClassUtils.getDefaultClassLoader()
.In addition to the inconsistency across hints classes, it looks like
SpringFactoriesLoaderRuntimeHints
is inconsistent withSpringFactoriesLoader
as the latter will useClassUtils.getDefaultClassLoader()
.The text was updated successfully, but these errors were encountered: