-
Bug
-
Resolution: Done
-
Critical
-
None
IIOImageProvider does not work properly with PNG images when running on JDK 11.
The org.jboss.resteasy.test.providers.iioimage.IIOImageProviderTest fails due to the following exception on server side:
Caused by: java.lang.IllegalStateException: Compression mode not MODE_EXPLICIT! at java.desktop/javax.imageio.ImageWriteParam.setCompressionQuality(ImageWriteParam.java:1239) at org.jboss.resteasy.plugins.providers.IIOImageProvider.writeTo(IIOImageProvider.java:148) at org.jboss.resteasy.plugins.providers.IIOImageProvider.writeTo(IIOImageProvider.java:35) at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.writeTo(AbstractWriterInterceptorContext.java:137) at org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:61) at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:124) at org.jboss.resteasy.security.doseta.DigitalSigningInterceptor.aroundWriteTo(DigitalSigningInterceptor.java:120) at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:129) at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:132) at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:469) ... 43 more
This has to do with com.sun.imageio.plugins.png.PNGImageWriteParam canWriteCompressed() method returning true while it used to return false on previous JDK versions. That is likely related to https://bugs.openjdk.java.net/browse/JDK-6488522 (see also http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/6648f64ba30a)
See the details on upstream jira RESTEASY-1619
- clones
-
RESTEASY-1619 IIOImageProvider not working properly on JDK 11
- Closed
- is incorporated by
-
WFLY-11648 Upgrade to RESTEasy 3.6.3.Final
- Closed