Open
Description
π€ What's the problem you're trying to solve?
As we are considering Java 17 (#2962) one element to consider is that more null
hostile API's are added to the JDK. It would be nice if problems related to this could be caught at build time.
JUnit 5 is using JSpecify in combination with ErrorProne and the NullAway plugin. See: junit-team/junit-framework#4557
Applying these annotations to Cucumber and its components would make them easier to work with. For example the messages
implementation is already
β¨ What's your proposed solution?
Add nullability annotations and compile-time checks starting with Cucumber depdencies:
- https://github.com/cucumber/ci-environment
- https://github.com/cucumber/cucumber-expressions
- https://github.com/cucumber/tag-expressions
- https://github.com/cucumber/messages/
- https://github.com/cucumber/query
- https://github.com/cucumber/gherkin
- https://github.com/cucumber/html-formatter
- https://github.com/cucumber/junit-xml-formatter
- https://github.com/cucumber/testng-xml-formatter
Then add these to Cucumber-JVM.
To avoid duplciating Maven configurations, it might be worthwhile to add the configuration to cucumber-parent
.
β Have you considered any alternatives or workarounds?
No response
π Any additional context?
No response