Catch all errors in getParents(), improves Java 8 compatibility

If the superclasses cannot be read in ClassLoaderProvider for any reason,
we ignore it and move on. This was the case before but the exception catch
was changed to only include IOError during the 1.5 refactor. This uncovered
an issue where on Java 8 inheritance traversal was hitting the Java 8 classes
in the JRE and throwing IllegalArgumentExceptions from ASM 4.1 since it does
not yet support the 52.0 classfile format.

To restore the previous behavior we change from catching IOException to Throwable,
including IllegalArgumentException. This will prevent correct inheritance trees
to be built on Java 8 classes however this is no worse than before and could be
fixed separately by an ASM 5 or 4.1.1 update once/if it is available.

For background see:
https://github.com/MinecraftPortCentral/MCPC-Plus/issues/841
This commit is contained in:
Agaricus 2013-05-09 19:51:23 -07:00
parent 4fd0cde9d1
commit 710ccc6439

View File

@ -70,7 +70,7 @@ public class ClassLoaderProvider implements InheritanceProvider {
}
return parents;
} catch (IOException ex) {
} catch (Throwable ex) {
// Just ignore this, means that we couldn't get any lookup for the specified class
} finally {
if (input != null) {