You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "AdvancedWarrior (via GitHub)" <gi...@apache.org> on 2025/06/09 07:12:03 UTC
[PR] fix(): [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java [gravitino]
AdvancedWarrior opened a new pull request, #7362:
URL: https://github.com/apache/gravitino/pull/7362
…a #7245
<!--
1. [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
(Please outline the changes and how this PR fixes the issue.)
### Why are the changes needed?
#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java
### Does this PR introduce _any_ user-facing change?
no
(Please list the user-facing changes introduced by your change, including
(Please test your changes, and provide instructions on how to test it:
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(): [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades closed pull request #7362: fix(): [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java
URL: https://github.com/apache/gravitino/pull/7362
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(): [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on code in PR #7362:
URL: https://github.com/apache/gravitino/pull/7362#discussion_r2135203376
##########
clients/client-java/src/main/java/org/apache/gravitino/client/BaseSchemaCatalog.java:
##########
@@ -82,17 +82,21 @@ abstract class BaseSchemaCatalog extends CatalogDTO
catalogNamespace != null && catalogNamespace.length() == 1,
"Catalog namespace must be non-null and have 1 level, the input namespace is %s",
catalogNamespace);
+
this.catalogNamespace = catalogNamespace;
+ String namespaceName = catalogNamespace.level(0);
+ Namespace.check(namespaceName != null && !namespaceName.isEmpty(),
Review Comment:
could you plz add tests to cover the case?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(): [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java [gravitino]
Posted by "AdvancedWarrior (via GitHub)" <gi...@apache.org>.
AdvancedWarrior commented on code in PR #7362:
URL: https://github.com/apache/gravitino/pull/7362#discussion_r2135305918
##########
clients/client-java/src/main/java/org/apache/gravitino/client/BaseSchemaCatalog.java:
##########
@@ -82,17 +82,21 @@ abstract class BaseSchemaCatalog extends CatalogDTO
catalogNamespace != null && catalogNamespace.length() == 1,
Review Comment:
No. Please take a close look
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(): [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on PR #7362:
URL: https://github.com/apache/gravitino/pull/7362#issuecomment-2955104504
The issue was closed, plz see: https://github.com/apache/gravitino/issues/7245#issuecomment-2955101996
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(): [#7245][Improvement] Fix possible NPE in BaseSchemaCatalog.java [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on code in PR #7362:
URL: https://github.com/apache/gravitino/pull/7362#discussion_r2135203376
##########
clients/client-java/src/main/java/org/apache/gravitino/client/BaseSchemaCatalog.java:
##########
@@ -82,17 +82,21 @@ abstract class BaseSchemaCatalog extends CatalogDTO
catalogNamespace != null && catalogNamespace.length() == 1,
"Catalog namespace must be non-null and have 1 level, the input namespace is %s",
catalogNamespace);
+
this.catalogNamespace = catalogNamespace;
+ String namespaceName = catalogNamespace.level(0);
+ Namespace.check(namespaceName != null && !namespaceName.isEmpty(),
Review Comment:
could you plz add tests to cover the case?
##########
clients/client-java/src/main/java/org/apache/gravitino/client/BaseSchemaCatalog.java:
##########
@@ -82,17 +82,21 @@ abstract class BaseSchemaCatalog extends CatalogDTO
catalogNamespace != null && catalogNamespace.length() == 1,
Review Comment:
here is the same check as you did?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org