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

Fix nullpointer exception when reporting with TakeAllSelector #947

Conversation

lacinoire
Copy link
Contributor

When using the TakeAllSelector, a null pointer exception appears in the output log.

Example excerpt from the log from running MainTest..testMainWithEmptyTestMethods() on master:

[INFO] 2020-06-01 11:10:10 DSpot - elapsedTime 1310
java.lang.NullPointerException
	at eu.stamp_project.dspot.common.report.output.selector.TestSelectorElementReportImpl.getReportForCollector(TestSelectorElementReportImpl.java:42)
	at eu.stamp_project.dspot.common.configuration.AmplificationSetup.postAmplification(AmplificationSetup.java:84)
	at eu.stamp_project.dspot.DSpot.run(DSpot.java:54)
	at eu.stamp_project.Main.main(Main.java:20)
	at eu.stamp_project.MainTest.testMainWithEmptyTestMethods(MainTest.java:164)
	at ...
[ERROR] 2020-06-01 11:10:10 DSpot - Something bad happened during the report fot test-criterion.

I added a simple TestClassJSON for the TakeAllSelector, and a test case that shows that the NullPointerException is no longer appearing.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2514

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 83.223%

Totals Coverage Status
Change from base Build 2513: 0.006%
Covered Lines: 4911
Relevant Lines: 5901

💛 - Coveralls

@monperrus monperrus merged commit aaec93a into STAMP-project:master Jun 1, 2020
@monperrus
Copy link
Member

Thanks a lot:!

@lacinoire lacinoire deleted the fix-nullpointer-takeallselector branch March 22, 2021 10:02
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.

3 participants