I've encountered a situation where :class-path-url is unset for one of the frames in my stack trace, which causes a NullPointerException when file->source is called with nil for the file-path argument. io/resource handles some cases gracefully where the argument is an empty string or a file that doesn't exist (returning nil) but it blows up if passed nil directly. This patch is a small tweak that bails early if the input itself is nil.
I've encountered a situation where
:class-path-url
is unset for one of the frames in my stack trace, which causes a NullPointerException whenfile->source
is called withnil
for the file-path argument.io/resource
handles some cases gracefully where the argument is an empty string or a file that doesn't exist (returningnil
) but it blows up if passednil
directly. This patch is a small tweak that bails early if the input itself isnil
.