Overview

Although the implementation of org.springframework.util.StreamUtils.drain(InputStream) originally threw an IllegalArgumentException for a null InputStream, since commit 0b9b9b4602050a7594deabad82d5ccbdecb1e520 drain() returns 0 for a null stream.

Consequently, the @Contract("null -> fail") declaration is incorrect.

Related Issues

  • 32695