diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index b67bf3fa1d792..965007ab7f4fd 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -83,7 +83,7 @@
3.6.0
2.1.0
- 20.3.0
+ 20.3.1
1.0.6.Final
2.12.1
1.0.0.Final
diff --git a/build-parent/pom.xml b/build-parent/pom.xml
index 07bcfb98904bf..eea5d104448ca 100644
--- a/build-parent/pom.xml
+++ b/build-parent/pom.xml
@@ -34,7 +34,7 @@
- 20.3.0
+ 20.3.1
20.3
4.3.2
1.1.0
@@ -127,7 +127,7 @@
false
- quay.io/quarkus/ubi-quarkus-native-image:20.3.0-java11
+ quay.io/quarkus/ubi-quarkus-native-image:20.3.1-java11
sh
${maven.multiModuleProjectDirectory}/.github/docker-prune.${script.extension}
diff --git a/core/deployment/src/main/java/io/quarkus/deployment/ImageIOProcessor.java b/core/deployment/src/main/java/io/quarkus/deployment/ImageIOProcessor.java
deleted file mode 100644
index 5cd6743caed4f..0000000000000
--- a/core/deployment/src/main/java/io/quarkus/deployment/ImageIOProcessor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package io.quarkus.deployment;
-
-import java.util.Arrays;
-import java.util.List;
-
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
-import io.quarkus.deployment.pkg.steps.NativeBuild;
-
-public class ImageIOProcessor {
-
- @BuildStep(onlyIf = NativeBuild.class)
- List runtimeInitImageIOClasses() {
- // The following classes hold instances of java.awt.color.ICC_ColorSpace that are not allowed in the image
- // heap as this class should be initialized at image runtime
- // (See https://github.com/quarkusio/quarkus/issues/12535)
- return Arrays.asList(
- new RuntimeInitializedClassBuildItem("javax.imageio.ImageTypeSpecifier"),
- new RuntimeInitializedClassBuildItem("com.sun.imageio.plugins.jpeg.JPEG$JCS"),
- new RuntimeInitializedClassBuildItem("java.awt.image.AreaAveragingScaleFilter"));
- }
-}
diff --git a/extensions/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java b/extensions/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java
index b25b2cbb24e49..7ddfd2af4cbd9 100644
--- a/extensions/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java
+++ b/extensions/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java
@@ -31,7 +31,6 @@
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceDirectoryBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
-import io.quarkus.deployment.pkg.steps.NativeBuild;
import io.quarkus.deployment.util.ServiceUtil;
import io.quarkus.tika.TikaParseException;
import io.quarkus.tika.runtime.TikaConfiguration;
@@ -69,17 +68,10 @@ FeatureBuildItem feature() {
return new FeatureBuildItem(Feature.TIKA);
}
- @BuildStep(onlyIf = NativeBuild.class)
- List runtimeInitImageIOClasses() {
- return Arrays.asList(
- //org.apache.tika.parser.pdf.PDFParser (https://issues.apache.org/jira/browse/PDFBOX-4548)
- new RuntimeInitializedClassBuildItem("org.apache.pdfbox.pdmodel.font.PDType1Font"),
- // The following classes hold instances of java.awt.color.ICC_ColorSpace that are not allowed in the
- // image heap as this class should be initialized at image runtime
- // See https://github.com/quarkusio/quarkus/pull/13644
- new RuntimeInitializedClassBuildItem("org.apache.pdfbox.rendering.SoftMask"),
- new RuntimeInitializedClassBuildItem(
- "org.apache.pdfbox.pdmodel.graphics.color.PDCIEDictionaryBasedColorSpace"));
+ @BuildStep
+ public void registerRuntimeInitializedClasses(BuildProducer resource) {
+ //org.apache.tika.parser.pdf.PDFParser (https://issues.apache.org/jira/browse/PDFBOX-4548)
+ resource.produce(new RuntimeInitializedClassBuildItem("org.apache.pdfbox.pdmodel.font.PDType1Font"));
}
@BuildStep
diff --git a/extensions/tika/runtime/src/main/java/io/quarkus/tika/runtime/graal/PDFBoxSubstitutions.java b/extensions/tika/runtime/src/main/java/io/quarkus/tika/runtime/graal/PDFBoxSubstitutions.java
deleted file mode 100644
index b8441b5d728eb..0000000000000
--- a/extensions/tika/runtime/src/main/java/io/quarkus/tika/runtime/graal/PDFBoxSubstitutions.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package io.quarkus.tika.runtime.graal;
-
-import java.awt.color.ColorSpace;
-import java.awt.color.ICC_ColorSpace;
-
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.Substitute;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB")
-final class Target_org_apache_pdfbox_pdmodel_graphics_color_PDDeviceRGB {
- @Substitute
- private void init() {
- // This method appears to be just a workaround for PDFBOX-2184
- }
-
- // awtColorSpace is not actually used in PDDeviceRGB
- @Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
- private volatile ColorSpace awtColorSpace;
-}
-
-@TargetClass(className = "org.apache.pdfbox.pdmodel.graphics.color.PDICCBased")
-final class Target_org_apache_pdfbox_pdmodel_graphics_color_PDICCBased {
- // This class provides alternative paths for when awtColorSpace is null, so it is safe to reset it
- @Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
- private volatile ICC_ColorSpace awtColorSpace;
-}
-
-// Substitutions to prevent ICC_ColorSpace instances from appearing in the native image when using Apache Tika
-// See https://github.com/quarkusio/quarkus/pull/13644
-// These substitutions can be removed when moving from GraalVM 20.3 to GraalVM 21.0.
-class PDFBoxSubstitutions {
-
-}
diff --git a/independent-projects/bootstrap/pom.xml b/independent-projects/bootstrap/pom.xml
index a7cde0e69ad52..e094fe25992ab 100644
--- a/independent-projects/bootstrap/pom.xml
+++ b/independent-projects/bootstrap/pom.xml
@@ -45,7 +45,7 @@
1.0.5
1.1.0.Final
1.7.30
- 20.3.0
+ 20.3.1
2.6.0
3.0.0-M5
1.5.0
diff --git a/integration-tests/main/src/main/java/io/quarkus/it/corestuff/ImageIOSupport.java b/integration-tests/main/src/main/java/io/quarkus/it/corestuff/ImageIOSupport.java
index 188b8888fc77b..18358d57acb01 100644
--- a/integration-tests/main/src/main/java/io/quarkus/it/corestuff/ImageIOSupport.java
+++ b/integration-tests/main/src/main/java/io/quarkus/it/corestuff/ImageIOSupport.java
@@ -1,7 +1,9 @@
package io.quarkus.it.corestuff;
+import java.awt.image.BufferedImage;
import java.io.IOException;
+import javax.imageio.ImageIO;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -12,10 +14,9 @@ public class ImageIOSupport extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
- // Please uncomment this when we upgrade from GraalVM 20.3 to GraalVM 21
- // ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- // BufferedImage image = ImageIO.read(classLoader.getResource("META-INF/resources/1px.png"));
- // resp.getWriter().write(image.getHeight() + "x" + image.getWidth());
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ BufferedImage image = ImageIO.read(classLoader.getResource("META-INF/resources/1px.png"));
+ resp.getWriter().write(image.getHeight() + "x" + image.getWidth());
}
}
diff --git a/integration-tests/main/src/test/java/io/quarkus/it/main/ImageIOTestCase.java b/integration-tests/main/src/test/java/io/quarkus/it/main/ImageIOTestCase.java
index f368772940bba..66dbbc1eb55ee 100644
--- a/integration-tests/main/src/test/java/io/quarkus/it/main/ImageIOTestCase.java
+++ b/integration-tests/main/src/test/java/io/quarkus/it/main/ImageIOTestCase.java
@@ -3,7 +3,6 @@
import static io.restassured.RestAssured.when;
import static org.hamcrest.Matchers.equalTo;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import io.quarkus.test.junit.QuarkusTest;
@@ -12,7 +11,6 @@
public class ImageIOTestCase {
@Test
- @Disabled("Please bring this back when we upgrade from GraalVM 20.3 to GraalVM 21")
public void testImageRead() {
when().get("/core/imageio").then().body(equalTo("1x1"));
}