kbendick opened a new issue #1451:
URL: https://github.com/apache/iceberg/issues/1451


   I was looking at another PR and checking for nullability concerns, when I 
noticed that there are two constructors for `BaseCombineTask`. There's one 
constructor that takes in a `List<FileScanTask>` and one that uses varargs 
`FileScanTask...`. The List constructor specifically checks for null, however, 
the varargs one does not.
   
   However, because arrays are objects in java, the `FileScanTask...` when 
passed in `null` does not give `new FileScanTask[]{null}` or `new 
FileScanTask[0]`, it simply passes `null`.
   
   Therefore, it doesn't seem overly cautious to add a precondition check for 
null here since we have it already.
   
   The code in question is here:
   
https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/BaseCombinedScanTask.java#L32-L39
   
   I can submit a patch.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to