Skip to content

ClassUtils could use long form of Class.forName [SPR-17333] #21867

@spring-projects-issues

Description

@spring-projects-issues

Dave Syer opened SPR-17333 and commented

In ClassUtils.isPresent() we prefer ClassLoader.loadClass() to Class.forName(), even though there is a form of Class.forName() that includes the ClassLoader, and also provides the option to not initialize the class (which seems ideal for isPresent()).

(N.B. in Substrate VM Class.forName(className, false, currentLoader) works, for a class that is present, whereas classLoader.loadClass() fails.)


Affects: 5.1 GA

Issue Links:

Referenced from: commits spring-projects/spring-boot@b1d4cf4

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions