mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 04:09:04 +00:00
Due to changes made in commit2fa87a71for SPR-9118, AbstractResource#contentLength would fall into an infinite loop unless the method were overridden by a subclass (which it is in the majority of use cases). This commit: - fixes the infinite recursion by refactoring to a while loop - asserts that the value returned from #getInputStream is not null in order to avoid NullPointerException - tests both of the above - adds Javadoc to the Resource interface to clearly document that the contract for any implementation is that #getInputStream must not return null Issue: SPR-9163 Backport-Issue: SPR-9161 Backport-Commit:7ca5fba05f