if (!(ch instanceof SeekableByteChannel sbc))
return super.readAllBytes();
https://github.com/openjdk/jdk/commit/0786d8b7b367e3aa3ffa54a3e339572938378dca#diff-21e4ff89fd54955e45fcd085ae8c08033b6c92de7f98ab0c836d4f754117ececR171
Since IntputStream.readAllBytes() calls readNBytes() again, this results in a stack overflow (rather than incorrect data being returned).
- relates to
-
JDK-8268435 (ch) ChannelInputStream could override readAllBytes
-
- Closed
-
- links to
-
Review openjdk/jdk/5824