ceki/logback — comment on commit 2086439d38f2654dc8917779e7bb254eeae02043
File:  line 0
By ceki:

If we don't have permission to load classes there is not much we can do. I think it's safer just to let SecurityExceptions bubble up instead of pretending that it's a situation we can deal with.

Also note that Loader.getClassLoaderOfObject never returns null. It either returns a a class loader or raises a SecurityException thrown by the SecurityManager.

I don't think the defensive code you are proposing is beneficial.