Skip to content

Consider nullability annotations and compile-time checksΒ #3000

Open
@mpkorstanje

Description

@mpkorstanje

πŸ€” 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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions