georgereuben commented on code in PR #7965:
URL: https://github.com/apache/gravitino/pull/7965#discussion_r2267450588
##########
api/src/main/java/org/apache/gravitino/Namespace.java:
##########
@@ -75,14 +75,12 @@ public static Namespace of(String... levels) {
*/
public static Namespace fromString(String namespace) {
Preconditions.checkArgument(namespace != null, "Cannot create a namespace
with null input");
+ Preconditions.checkArgument(!StringUtils.isBlank(namespace), "Cannot
create a namespace with blank input");
Review Comment:
I think the issue requires that strings with whitespaces should throw the
`IllegalArgumentException` and that empty strings should return
`Namespace.empty` as before.
Your changes would throw the IllegalArgumentException for empty strings as
well. Please check with @justinmclean if this is what's needed?
--
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]