From 96d3a45ba8c486bb75f371d076c8555016225f80 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 17 Feb 2021 13:50:30 +0100 Subject: [PATCH] Revert "Removing JavaIOSubstitutions #15039" This reverts commit 66a6e9a795bab78f53bc49a060788908af51dafa. --- .../runtime/graal/JavaIOSubstitutions.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 core/runtime/src/main/java/io/quarkus/runtime/graal/JavaIOSubstitutions.java diff --git a/core/runtime/src/main/java/io/quarkus/runtime/graal/JavaIOSubstitutions.java b/core/runtime/src/main/java/io/quarkus/runtime/graal/JavaIOSubstitutions.java new file mode 100644 index 0000000000000..1b7e66746f6e4 --- /dev/null +++ b/core/runtime/src/main/java/io/quarkus/runtime/graal/JavaIOSubstitutions.java @@ -0,0 +1,25 @@ +package io.quarkus.runtime.graal; + +import java.io.ObjectStreamClass; + +import com.oracle.svm.core.annotate.Substitute; +import com.oracle.svm.core.annotate.TargetClass; + +@TargetClass(java.io.ObjectStreamClass.class) +@SuppressWarnings({ "unused" }) +final class Target_java_io_ObjectStreamClass { + + @Substitute + private static ObjectStreamClass lookup(Class cl, boolean all) { + throw new UnsupportedOperationException("Serialization of class definitions not supported"); + } + + private Target_java_io_ObjectStreamClass(final Class cl) { + throw new UnsupportedOperationException("Serialization of class definitions not supported"); + } + + private Target_java_io_ObjectStreamClass() { + throw new UnsupportedOperationException("Not supported"); + } + +}