diff --git a/core/runtime/src/main/java/io/quarkus/runtime/graal/LCMSSubstitutions.java b/core/runtime/src/main/java/io/quarkus/runtime/graal/LCMSSubstitutions.java index 322349e23613aa..9557212c5dc646 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/graal/LCMSSubstitutions.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/graal/LCMSSubstitutions.java @@ -4,8 +4,9 @@ import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.TargetClass; +import com.oracle.svm.core.jdk.JDK16OrEarlier; -@TargetClass(className = "sun.java2d.cmm.lcms.LCMS") +@TargetClass(className = "sun.java2d.cmm.lcms.LCMS", onlyWith = JDK16OrEarlier.class) final class Target_sun_java2d_cmm_lcms_LCMS { @Substitute diff --git a/core/runtime/src/main/java/io/quarkus/runtime/graal/LCMSSubstitutionsJDK17.java b/core/runtime/src/main/java/io/quarkus/runtime/graal/LCMSSubstitutionsJDK17.java new file mode 100644 index 00000000000000..90f53d9b77722e --- /dev/null +++ b/core/runtime/src/main/java/io/quarkus/runtime/graal/LCMSSubstitutionsJDK17.java @@ -0,0 +1,90 @@ +package io.quarkus.runtime.graal; + +import java.awt.color.ICC_Profile; + +import com.oracle.svm.core.annotate.Substitute; +import com.oracle.svm.core.annotate.TargetClass; +import com.oracle.svm.core.jdk.JDK17OrLater; + +@TargetClass(className = "sun.java2d.cmm.lcms.LCMS", onlyWith = JDK17OrLater.class) +final class Target_sun_java2d_cmm_lcms_LCMS_JDK17 { + + @Substitute + static long loadProfileNative(byte[] data, Object ref) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + static void getProfileDataNative(long ptr) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + static byte[] getTagNative(long profileID, int signature) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + static void setTagDataNative(long ptr, int tagSignature, + byte[] data) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + public byte[] getProfileData(Profile p) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + public byte[] getTagData(Profile p, int tagSignature) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + public void setTagData(Profile p, int tagSignature, byte[] data) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + private static long createNativeTransform( + long[] profileIDs, int renderType, + int inFormatter, boolean isInIntPacked, + int outFormatter, boolean isOutIntPacked, + Object disposerRef) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + public static void initLCMS(Class Trans, Class IL, Class Pf) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + static synchronized LCMSProfile getProfileID(ICC_Profile profile) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @Substitute + public static void colorConvert(LCMSTransform trans, + LCMSImageLayout src, + LCMSImageLayout dest) { + throw new UnsupportedOperationException("Not implemented yet for GraalVM native images"); + } + + @TargetClass(className = "sun.java2d.cmm.Profile") + static final class Profile { + } + + @TargetClass(className = "sun.java2d.cmm.lcms.LCMSProfile") + static final class LCMSProfile { + } + + @TargetClass(className = "sun.java2d.cmm.lcms.LCMSImageLayout") + static final class LCMSImageLayout { + } + + @TargetClass(className = "sun.java2d.cmm.lcms.LCMSTransform") + static final class LCMSTransform { + } + +}