`java.io.InputStream::transferTo` could conceivably return a negative value if the count of bytes transferred overflows a `long`. Modify the method to limit the number of bytes transferred to `Long.MAX_VALUE` per invocation.
------------- Commit messages: - 8297632: InputStream.transferTo() method should specify what the return value should be when the number of bytes transfered is larger than Long.MAX_VALUE Changes: https://git.openjdk.org/jdk/pull/11403/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11403&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8297632 Stats: 23 lines in 1 file changed: 22 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11403.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11403/head:pull/11403 PR: https://git.openjdk.org/jdk/pull/11403