vlsi commented on a change in pull request #2273:
URL: https://github.com/apache/calcite/pull/2273#discussion_r529344575



##########
File path: 
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java
##########
@@ -1049,19 +1063,19 @@ private boolean isOverlapped(Pair<Long, Long> a, 
Pair<Long, Long> b) {
     @Override public void close() {
     }
 
-    private Object[] takeOne() {
-      return list.pollFirst();
+    private @Nullable Object[] takeOne() {
+      return requireNonNull(list.pollFirst(), "list.pollFirst()");

Review comment:
       This is just fine. `pollFirst` can return `null`, and here `non-null` is 
required by `takeOne`




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to