On Tue, 22 Mar 2022 01:45:30 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8274735: javax.imageio.IIOException: Unsupported Image Type while >> processing a valid JPEG image > > src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java > line 66: > >> 64: >> 65: public int hashCode() { >> 66: return System.identityHashCode(theInstance); > > Is it just a cleanup or it has some other reason? If toString() is called then you get StackOverflowException(). I am surprised no-one hit this already but I hit it repeatedly during testing. > src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java > line 1740: > >> 1738: raster.setRect(sourceLine); >> 1739: if (invertCMYK) { >> 1740: byte[] data = >> ((DataBufferByte)raster.getDataBuffer()).getData(); > > Is it known that the type of the raster here is always DataBufferByte? yes ------------- PR: https://git.openjdk.java.net/jdk/pull/7849