The branch removed here is dead because `read()` should never return `0` if `remaining > 0`. The dead code also had a bug: Casting the `int` result of `read()` to `byte` is wrong when the result is 255.
--------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8394737: FileInputStream.readNBytes dead code Changes: https://git.openjdk.org/jdk/pull/33401/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33401&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8394737 Stats: 8 lines in 1 file changed: 0 ins; 7 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/33401.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33401/head:pull/33401 PR: https://git.openjdk.org/jdk/pull/33401
