Skip to content

Changes in resource loading for 3.0.4 breaks for zipped files [SPR-7559] #12216

@spring-projects-issues

Description

@spring-projects-issues

Will May opened SPR-7559 and commented

In the AbstractFileResolvingResource.exists() method which was introduced in Spring Core 3.0.4, the call to URLConnection.getContentLength() assumes that it will return a negative number if the file doesn't exist. In actual fact, it will return -1 simply if the content length isn't known which is the case if the file is inside of a zip (or jar).

Bug introduced in commit rev. 3545 of Spring Core.


Affects: 3.0.4

Referenced from: commits e211c09

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions