You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2023/01/09 11:48:15 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #6474: Make it explicit that metrics reporter is required

nastra commented on code in PR #6474:
URL: https://github.com/apache/iceberg/pull/6474#discussion_r1064554092


##########
core/src/main/java/org/apache/iceberg/BaseTable.java:
##########
@@ -48,6 +49,7 @@ public BaseTable(TableOperations ops, String name) {
   }
 
   public BaseTable(TableOperations ops, String name, MetricsReporter reporter) {
+    Preconditions.checkNotNull(reporter, "reporter cannot be null");

Review Comment:
   IMO we should prefer `Preconditions.checkArgument` here, because it indicates that a wrong argument has been passed and is therefore more expressive. Also we generally use `Preconditions.checkArgument` more than `Preconditions.checkNotNull`:
   ``` 
   git grep 'Preconditions.checkArgument' | wc -l                                                                                                                                                                                                
   1542
   ```



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org