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

NullPointerException on calling analyze() if no record exists #4

Open
inhaledesign opened this issue Nov 3, 2016 · 1 comment
Open

Comments

@inhaledesign
Copy link

If I call Benchit.analyze("test") when no records for "test" have been recorded, I'll get this exception:

java.lang.NullPointerException: Attempt to invoke virtual method 'com.tspoon.benchit.Result com.tspoon.benchit.Benchmark.result()' on a null object reference

I know it's kindof minor and I could catch the exception myself, but it would be preferable if an empty result could be returned and .log() would print out a message indicating there were no records.

@T-Spoon
Copy link
Owner

T-Spoon commented Nov 14, 2016

Makes sense - should be an easy fix. I'll see if I can take care of this soon!

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

No branches or pull requests

2 participants