Return unsigned data bytes from InputStream.read()
ProprietaryMask a directly returned byte-array element with 0xff in an override of InputStream.read(). The contract returns data in the range 0 through 255 and reserves -1 for end of stream; promoting a signed byte can return negative data and mistake 0xff for EOF. Only direct primitive byte-array accesses are changed. Variables and helper calls that may represent EOF, other methods, bulk reads, casts, likely test sources and returns inside lambdas are left alone.
io. moderne. staticanalysis. UnsignedByteFromInputStreammod run . --recipe= io. moderne. staticanalysis. UnsignedByteFromInputStreamInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.