-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
Calling org.springframework.core.io.Resource#exists is called on a resource inside a JAR file (actually org.springframework.core.io.AbstractFileResolvingResource#exists in such cases), an input stream of whether the same or another resource in the same JAR file is (accidentally) closed. Trying to read (or continue reading) from such an input stream afterwards results in an java.io.IOException: Stream closed. The exist method should just answer it's intended question, but it should never change the state of an input stream.
This issue was introduced with v6.2.7, apparently with the fix for #34796.
I've created a small test project that shows some different combinations of resource reading along with exists checks: jar-resource-loader-test.zip
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regressionA bug that is also a regression