rubenada commented on code in PR #5213:
URL: https://github.com/apache/calcite/pull/5213#discussion_r4259650084
##########
splunk/src/main/java/org/apache/calcite/adapter/splunk/search/SplunkConnectionImpl.java:
##########
@@ -392,18 +395,20 @@ public SplunkResultEnumerator(InputStream in,
}
@Override public Object current() {
- return current;
+ return requireNonNull(current, "current");
Review Comment:
This might alter the existing behavior (potential new NPE where previously
no exception was thrown). Note that `moveNext` can actually assign
`this.current = null` in some cases apparently.
Why not using `castNonNull` to keep the old behavior (like in
GeodeSimpleEnumerator.java)?
--
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]