Skip to content

Unnecessary file system access in SimpleMetadataReaderFactory.getMetadataReader [SPR-16281] #20828

@spring-projects-issues

Description

@spring-projects-issues

Rex Hoffman opened SPR-16281 and commented

Instead of eagerly checking the file exists with "if (!resource.exists())" perhaps move the logic into the metadata reader only attempt the rewrite if the access has failed with the passed in name?

We can provide a patch if needed.


Affects: 4.3.6, 4.3.14

Reference URL: https://github.com/spring-projects/spring-framework/blob/master/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReaderFactory.java#L80-L90

Issue Links:

Referenced from: commits 7ad69bf, 3368dca

Backported to: 4.3.14

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions