Closed dariuslf closed 2 years ago
Sorry about that.
I've fixed it now in the dev
branch. I made sure all access to errorInfo.method
is null-safe, but I noticed mosts accesses in Spock itself don't check that for null.
Please let me know if you can try to build locally and confirm the bug fix.
There's another bug fix waiting for release (https://github.com/renatoathaydes/spock-reports/issues/217) so I want to make a release as soon as possible.
Great, that seems to have done the trick. Looking forward to a release!
Released fix in 2.1.1-groovy-3.0.
Hi @renatoathaydes, you helped out with this before (#212).
But your commits to resolve #215 seem to have reintroduced an issue.
https://github.com/renatoathaydes/spock-reports/blob/master/src/main/groovy/com/athaydes/spockframework/report/SpockReportExtension.groovy#L195
This line now dereferences
errorInfo.method.feature.spec
causing an NRE if the method is not part of a feature.https://github.com/renatoathaydes/spock-reports/blob/master/src/main/groovy/com/athaydes/spockframework/report/SpockReportExtension.groovy#L204
This line already dereferences
errorInfo.method?.kind
safely and I would propose updating line 195 to do likewise, ie.errorInfo.method?.feature?.spec
.Thanks for your effort with this project!