damondouglas commented on code in PR #27416:
URL: https://github.com/apache/beam/pull/27416#discussion_r1260092566
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/util/NoopLock.java:
##########
@@ -56,16 +54,15 @@ public boolean tryLock() {
}
@Override
- public boolean tryLock(long time, @Nonnull TimeUnit unit) {
+ public boolean tryLock(long time, @NonNull TimeUnit unit) {
return true;
}
@Override
public void unlock() {}
- @Nonnull
@Override
- public Condition newCondition() {
+ public @NonNull Condition newCondition() {
Review Comment:
To answer your question, no. The annotation does not exist on the
[Lock](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/locks/Lock.html#newCondition())
interface. The return type was annotated with `javax.annotation.Nonnull` by
the original author. Should we:
1. leave the `javax.annotation.Nonnull` annotated by the original author
2. replace with `org.checkerframework.checker.nullness.qual.NonNull`
3. Or delete the annotation and have no non null annotation?
Thank you for taking the time to look at this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]