@@ -0,0 +1,1609 @@
+package io.quarkus.runtime.graal;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.net.URL;%0Aimport java.util.Enumeration;%0A%0Aimport com.oracle.svm.core.annotate.Substitute;%0Aimport com.oracle.svm.core.annotate.TargetClass;%0Aimport com.oracle.svm.core.jdk.JDK11OrLater;%0A%0A/*%0A * The %60hasClassPath()%60 method substitution from this class is required to work around a NPE when %60BootLoader.hasClassPath()%60%0A * is called. This was fixed in a GraalVM commit (https://github.com/oracle/graal/commit/68027de) which will be backported to%0A * 19.3.1. We copied the entire GraalVM commit content into Quarkus for the sake of consistency.%0A * See https://github.com/oracle/graal/issues/1966 for more details about the NPE.%0A */%0A@TargetClass(className = %22jdk.internal.loader.BootLoader%22, onlyWith = JDK11OrLater.class)%0Afinal class Target_jdk_internal_loader_BootLoader %7B%0A%0A    @Substitute%0A    private static boolean hasClassPath() %7B%0A        return true;%0A    %7D%0A%0A    @Substitute%0A    private static URL findResource(String mn, String name) %7B%0A        return ClassLoader.getSystemClassLoader().getResource(name);%0A    %7D%0A%0A    @Substitute%0A    private static InputStream findResourceAsStream(String mn, String name) %7B%0A        return ClassLoader.getSystemClassLoader().getResourceAsStream(name);%0A    %7D%0A%0A    @Substitute%0A    private static URL findResource(String name) %7B%0A        return ClassLoader.getSystemClassLoader().getResource(name);%0A    %7D%0A%0A    @Substitute%0A    private static Enumeration%3CURL%3E findResources(String name) throws IOException %7B%0A        return ClassLoader.getSystemClassLoader().getResources(name);%0A    %7D%0A%7D%0A

Substitute BootLoader.hasClassPath() to work around a JDK 11 NPE