Catch linkage error

This commit is contained in:
Daniel Holle 2023-07-05 15:48:27 +02:00
parent 5c62191f3b
commit a17e1f473a

View File

@ -240,8 +240,8 @@ public class ASTToTargetAST {
); );
} }
private static final Map<String, FunNGenerator.GenericParameters> usedFunN = new HashMap<>(); private final Map<String, FunNGenerator.GenericParameters> usedFunN = new HashMap<>();
private static final Set<Integer> usedFunNSuperTypes = new HashSet<>(); private final Set<Integer> usedFunNSuperTypes = new HashSet<>();
public Map<String, byte[]> auxiliaries = new HashMap<>(); public Map<String, byte[]> auxiliaries = new HashMap<>();
@ -295,7 +295,9 @@ public class ASTToTargetAST {
try { try {
classLoader.findClass(superClassName); classLoader.findClass(superClassName);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
classLoader.loadClass(code); try {
classLoader.loadClass(code);
} catch (LinkageError ignored) {}
} }
auxiliaries.put(superClassName, code); auxiliaries.put(superClassName, code);
} }
@ -306,7 +308,9 @@ public class ASTToTargetAST {
try { try {
classLoader.findClass(className); classLoader.findClass(className);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
classLoader.loadClass(code); try {
classLoader.loadClass(code);
} catch (LinkageError ignored) {}
} }
usedFunN.put(className, gep); usedFunN.put(className, gep);
auxiliaries.put(className, code); auxiliaries.put(className, code);