Open
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