Catch NoClassDefFoundError when loading methods#879
Catch NoClassDefFoundError when loading methods#879lukehutch merged 1 commit intoclassgraph:latestfrom
NoClassDefFoundError when loading methods#879Conversation
Those happen if the method returns an unknown type
|
Great contribution, thanks. I'll check if |
|
@freya022 OK, so I handled this a different way, by moving the try...catch in the |
The extra catch was necessary because the exception is thrown when loading the method, the return type of the method is never loaded by ClassGraph, and so it must be loaded by the VM when getting the method, here's the stack trace I get, with my changes it would have been wrapped in an The method loaded is |
|
Ah, of course, your original change even said that in the comments. Thanks, I'll add the catch back again. |
I don't think adding it for the constructor is necessary, it returns itself, which is already loaded at this point, and the superclasses would be checked by the VM |
|
@freya022 Good catch, thanks. |
|
Released in 4.8.175. Thank you! |
Those happen if the method returns an unknown type, I also added documentation for the
IllegalArgumentExceptionthrown when loading parameter classes