This is an automated email from the ASF dual-hosted git repository.
yuqi4733 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 168395c2e7 [#7588] improvement : delete unused method (#7607)
168395c2e7 is described below
commit 168395c2e7feccee028d280c1f0886501c357b0a
Author: Jarvis <[email protected]>
AuthorDate: Wed Jul 9 09:39:42 2025 +0800
[#7588] improvement : delete unused method (#7607)
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
clean up unused method in `NameIdentifierUtil` class
### Why are the changes needed?
close issue #7588
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
using existing tests
---
.../org/apache/gravitino/utils/NameIdentifierUtil.java | 17 -----------------
1 file changed, 17 deletions(-)
diff --git
a/core/src/main/java/org/apache/gravitino/utils/NameIdentifierUtil.java
b/core/src/main/java/org/apache/gravitino/utils/NameIdentifierUtil.java
index e092b85ca8..e8d25169ce 100644
--- a/core/src/main/java/org/apache/gravitino/utils/NameIdentifierUtil.java
+++ b/core/src/main/java/org/apache/gravitino/utils/NameIdentifierUtil.java
@@ -20,8 +20,6 @@ package org.apache.gravitino.utils;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
-import com.google.errorprone.annotations.FormatMethod;
-import com.google.errorprone.annotations.FormatString;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@@ -33,7 +31,6 @@ import org.apache.gravitino.NameIdentifier;
import org.apache.gravitino.Namespace;
import org.apache.gravitino.authorization.AuthorizationUtils;
import org.apache.gravitino.exceptions.IllegalNameIdentifierException;
-import org.apache.gravitino.exceptions.IllegalNamespaceException;
/**
* A name identifier is a sequence of names separated by dots. It's used to
identify a metalake, a
@@ -428,20 +425,6 @@ public class NameIdentifierUtil {
NamespaceUtil.checkModelVersion(ident.namespace());
}
- /**
- * Check the given condition is true. Throw an {@link
IllegalNamespaceException} if it's not.
- *
- * @param expression The expression to check.
- * @param message The message to throw.
- * @param args The arguments to the message.
- */
- @FormatMethod
- public static void check(boolean expression, @FormatString String message,
Object... args) {
- if (!expression) {
- throw new IllegalNamespaceException(message, args);
- }
- }
-
/**
* Convert the given {@link NameIdentifier} and {@link Entity.EntityType} to
{@link
* MetadataObject}.