File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
common/src/main/java/net/adoptopenjdk/icedteaweb/jdk89access Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ public class JarIndexAccess {
3535 LOG .debug (CLASS_SUN_MISC_JAR_INDEX + " not found - Running jdk9+ ?" );
3636 jarIndexClass = Class .forName (CLASS_JDK_INTERNAL_UTIL_JAR_JAR_INDEX );
3737 } catch (ClassNotFoundException exx ) {
38- LOG .error (CLASS_JDK_INTERNAL_UTIL_JAR_JAR_INDEX + " not found" );
39- throw new RuntimeException ( "JarIndex not found!" ) ;
38+ LOG .debug (CLASS_JDK_INTERNAL_UTIL_JAR_JAR_INDEX + " not found" );
39+ jarIndexClass = JarIndexDummy . class ;
4040 }
4141 }
4242 }
@@ -79,4 +79,18 @@ private LinkedList<String> getImpl(final String replace) throws NoSuchMethodExce
7979 final Object o = method .invoke (parent , replace );
8080 return (LinkedList <String >) o ;
8181 }
82+
83+ /**
84+ * Because starting of JAVA 21 the JarIndex is no longer supported we provide a dummy implementation which always returns {@code null}.
85+ */
86+ @ SuppressWarnings ("unused" )
87+ private static class JarIndexDummy {
88+ public static Object getJarIndex (JarFile jar ) {
89+ return null ;
90+ }
91+
92+ public Object get (String fileName ) {
93+ return null ;
94+ }
95+ }
8296}
You can’t perform that action at this time.
0 commit comments