-
Notifications
You must be signed in to change notification settings - Fork 205
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
docs: replace com.vaadin.hilla.Nonnull usages #4155
base: latest
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but also updated the recommendation of Vaadin about using JSpecify NonNull and Nullable annotations. Asking @cromoteca for a second review.
|
||
You can use any annotation that has the name `nonnull` (case-insensitive). Below are examples of this: | ||
While the usage of any annotation that has the name `nonnull` (case-insensitive) is supported, Vaadin recommends using the `org.jspecify.annotations.NonNull`. Below are some examples of other supported `nonnull` annotations: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also remove the bullet list below. It's not up-to-date and brings more confusion than value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I addressed this a while ago, so it could get merged IMO, unless there's something more to address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a bit better like this
@@ -15,16 +15,12 @@ Types that are set as _non_nullable_ are in essence required. Whereas types that | |||
- A collection accepts `null`, unless the collection item type is primitive. | |||
- A map accepts `null`, unless the collection item type is primitive. | |||
|
|||
Any of these nullable types can be made non-nullable by applying a `@Nonnull` annotation. | |||
Any of these nullable types can be made non-nullable by applying a `@NonNull` annotation. Vaadin recommends using the `@org.jspecify.annotations.NonNull`. However, the list of all supported annotations is as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any of these nullable types can be made non-nullable by applying a `@NonNull` annotation. Vaadin recommends using the `@org.jspecify.annotations.NonNull`. However, the list of all supported annotations is as follows: | |
Any of these nullable types can be made non-nullable by applying a `@NonNull` annotation. Vaadin recommends using `@org.jspecify.annotations.NonNull`. The full list of supported annotations is as follows: |
|
||
By default, the following annotation is supported: `org.springframework.lang.NonNullApi`. | ||
|
||
To make any type nullable, you must add `@Nullable` annotation to it. | ||
To make any type nullable, you must add `@Nullable` annotation to it. Vaadin recommends using the `@org.jspecify.annotations.Nullable`. However, the list of all supported annotations is as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make any type nullable, you must add `@Nullable` annotation to it. Vaadin recommends using the `@org.jspecify.annotations.Nullable`. However, the list of all supported annotations is as follows: | |
To make any type nullable, you must add a `@Nullable` annotation to it. Vaadin recommends using `@org.jspecify.annotations.Nullable`. The full list of supported annotations is as follows: |
Fixes #4156
Fixes vaadin/hilla#3350
Replaces usages of the deprecated
com.vaadin.hilla.Nonnull
annotation in examples with the jspecify variant.