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

Development: Enforce consistent usage of nullness annotations #6872

Merged
merged 6 commits into from
Jul 13, 2023

Conversation

Strohgelaender
Copy link
Contributor

@Strohgelaender Strohgelaender commented Jul 10, 2023

Checklist

General

Motivation and Context

There are many possibilites for defining nullness annotations in Java (see https://stackoverflow.com/questions/4963300/which-notnull-java-annotation-should-i-use).

We decided for Artemis to use javax.validation.constraints.NotNull and javax.annotation.Nullable (see #6019)

Description

This PR adds an ArchUnit test that verifies the correct annotations. Since ArchUnit defines simple name matcher only for classes and not for Annotations, I implemented them myself.

Steps for Testing

code review

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) labels Jul 10, 2023
@Strohgelaender Strohgelaender marked this pull request as ready for review July 10, 2023 10:13
@Strohgelaender Strohgelaender requested a review from a team as a code owner July 10, 2023 10:13
Copy link
Contributor

@tobias-lippert tobias-lippert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, thanks for adding the ArchUnit test to avoid regressions.

Copy link
Contributor

@DominikRemo DominikRemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM 🚀

@Strohgelaender Strohgelaender added this to the 6.3.4 milestone Jul 10, 2023
@krusche krusche merged commit 3391ee0 into develop Jul 13, 2023
@krusche krusche deleted the chore/archunit-null branch July 13, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants