amogh-jahagirdar commented on code in PR #6777: URL: https://github.com/apache/iceberg/pull/6777#discussion_r1100883382
########## core/src/main/java/org/apache/iceberg/TableMetadata.java: ########## @@ -290,7 +291,7 @@ public String toString() { this.metadataFileLocation = metadataFileLocation; this.formatVersion = formatVersion; this.uuid = uuid; - this.location = location; + this.location = location != null ? LocationUtil.stripTrailingSlash(location) : null; Review Comment: Nit: I feel like we should just change `LocationUtil.stripTrailingSlash` to return null if a null location is passed in instead of throwing an NPE otherwise I think we have to do this null check everywhere where we don't have a location defined in advance. But it's a public utility which may be used beyond the Iceberg library itself so I understand not wanting to change it at this point. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org