dramaticlly commented on code in PR #17751:
URL: https://github.com/apache/iceberg/pull/17751#discussion_r3882396384


##########
core/src/main/java/org/apache/iceberg/rest/responses/FetchPlanningResultResponse.java:
##########
@@ -99,8 +98,10 @@ public Builder withErrorResponse(ErrorResponse response) {
       return this;
     }
 
-    public Builder withCredentials(List<Credential> credentialsToAdd) {
-      credentials.addAll(credentialsToAdd);
+    public Builder withCredentials(List<Credential> newCredentials) {
+      Preconditions.checkArgument(null != newCredentials, "Invalid 
credentials: null");

Review Comment:
   Thanks @singhpk234 , I think ListTableResponse is relative old (merged Feb 
2022) compare to the latest agents.md guideline in 
https://github.com/apache/iceberg/blob/f80a72fe995bd4236a0dbe78f8cf29848792fe8f/AGENTS.md?plain=1#L121
 which prefer IllegalArgumentException over NPE. Let me know if you want to 
switch to NPE instead



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


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

Reply via email to