-
Notifications
You must be signed in to change notification settings - Fork 78
Migrate to JSpecify annotations for nullability constraints. #625
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
Conversation
pom.xml
Outdated
| <version>${querydsl}</version> | ||
| <optional>true</optional> | ||
| </dependency> | ||
| <dependency> |
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.
This isn't required, JSpecify is a transitive dependency of Spring Framework.
| Assert.notNull(objectToUpdate, "Object to be updated must not be null"); | ||
|
|
||
| String keyspace = resolveKeySpace(objectToUpdate.getClass()); | ||
| Assert.notNull(keyspace, "Keyspace must not be null"); |
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.
should not be required.
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.
good catch - added that one before the null check in resolveKeySpace - same goes for others
| Assert.notNull(type, "Type to delete must not be null"); | ||
|
|
||
| String keyspace = resolveKeySpace(type); | ||
| Assert.notNull(keyspace, "Keyspace must not be null"); |
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.
should not be required.
| Assert.notNull(type, "Type to fetch must not be null"); | ||
|
|
||
| String keyspace = resolveKeySpace(type); | ||
| Assert.notNull(keyspace, "Keyspace must not be null"); |
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.
should not be required.
| } | ||
|
|
||
| private static <S> List<S> filterMatchingRange(List<S> source, @Nullable Predicate criteria, long offset, int rows) { | ||
| @Contract("!null, _, _, _ -> !null") |
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.
Hum, the return is never null and source cannot be null. You sure about this annotation?
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.
never null regardless of input - I don't mind dropping it.
|
|
||
| if (beanDefinition != null) { | ||
| if (beanDefinition != null && configurationSource.getSource() != null) { | ||
| registerIfNotAlreadyRegistered(() -> beanDefinition, registry, keyValueTemplateName.get(), |
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.
Looks like a missing @Nullable annotation for source in Commons.
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.
maybe... care to check in commons.
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.
No description provided.