[java] Avoid runtime errors on incomplete classpath

This commit is contained in:
Juan Martín Sotuyo Dodero
2017-10-27 02:26:23 -03:00
parent 2d15c6dba6
commit 71d94b4ccd

View File

@ -450,10 +450,14 @@ public final class MethodTypeResolution {
Class<?> contextClass = context.getType();
// search the class
for (Method method : contextClass.getDeclaredMethods()) {
if (isMethodApplicable(method, methodName, argArity, accessingClass, typeArguments)) {
result.add(getTypeDefOfMethod(context, method, typeArguments));
try {
for (Method method : contextClass.getDeclaredMethods()) {
if (isMethodApplicable(method, methodName, argArity, accessingClass, typeArguments)) {
result.add(getTypeDefOfMethod(context, method, typeArguments));
}
}
} catch (final LinkageError ignored) {
// TODO : This is an incomplete classpath, report the missing class
}
// search it's supertype