(note: offshoot of FasterXML/jackson-databind#3455)
Looks like there is a code path during initialization of InputStream for managed streams (for java.io.File and java.net.URL) which may result in leaked InputStreams (and related entities like file handles).
It's necessary to ensure that this does not happen.