xiangfu0 commented on a change in pull request #6824:
URL: https://github.com/apache/incubator-pinot/pull/6824#discussion_r619021871



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/routing/segmentpruner/interval/Interval.java
##########
@@ -78,19 +74,17 @@ public int hashCode() {
     return result;
   }
 
+  @Nullable
   public static Interval getIntersection(Interval a, Interval b) {
-    Preconditions.checkNotNull(a, "Intersect invalid intervals {} and {}", a, 
b);
-    Preconditions.checkNotNull(b, "Intersect invalid intervals {} and {}", a, 
b);
     if (!a.intersects(b)) {

Review comment:
       There will be NPE if a is null.
   Shall we create a static method in Interval, then do 
`Interval.intersects(a,b)`?




-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to