Skip to content

Fix NPE if a frame's file path is nil#14

Merged
martinklepsch merged 1 commit intosethtrain:masterfrom
mikeclarke:fix-npe
Sep 6, 2016
Merged

Fix NPE if a frame's file path is nil#14
martinklepsch merged 1 commit intosethtrain:masterfrom
mikeclarke:fix-npe

Conversation

@mikeclarke
Copy link
Copy Markdown
Contributor

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.

@martinklepsch martinklepsch merged commit c86abb8 into sethtrain:master Sep 6, 2016
@martinklepsch
Copy link
Copy Markdown
Collaborator

released with 1.4.3. Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants