Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed two NullPointerException when Context.hashcode() is called. #50

Merged
merged 3 commits into from
Apr 22, 2016

Conversation

rondicus
Copy link
Contributor

In both cases Context.getInstance() was called with a null-graph, which causes a NPE a bit further along when context.hashcode() is called.

I was thinking about a UnitTest, but the expection happens during the AWT-Paint phase, so i scrapped that idea for now.
The Problem is observable in one of the demos: EdgeLabelDemo

In both cases Context.getInstance() was called with a null-graph, which
causes a NPE a bit further along.
@rondicus
Copy link
Contributor Author

Also thanks a lot for maintaining the project 👍

@jrtom
Copy link
Owner

jrtom commented Apr 18, 2016

Thanks for the catch. Mind adding a Preconditions.checkNotNull() to EdgeIndexFunction.getIndex()?

(At that point a unit test becomes less obviously necessary.)

@jrtom jrtom self-assigned this Apr 18, 2016
@rondicus
Copy link
Contributor Author

I was away for a few days but added it now

@jrtom
Copy link
Owner

jrtom commented Apr 22, 2016

Thanks!

@jrtom jrtom merged commit a606c51 into jrtom:master Apr 22, 2016
@rondicus rondicus deleted the visualisation_npe branch April 25, 2016 09:10
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