Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-15887

IIOImageProvider not working properly on JDK 11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.3.0.CD16
    • None
    • REST

    Description

      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


      cc: rsvoboda@redhat.com, msvehla, jbliznak@redhat.com

      Attachments

        Issue Links

          Activity

            People

              rhn-support-asoldano Alessio Soldano
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: