This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 0f3b76d4bef HDDS-14605. Remove usage of Netty internal StringUtil
(#9747)
0f3b76d4bef is described below
commit 0f3b76d4befbc3a76b05d1d703508b1b2d4b3a84
Author: Han-Wen Hsu <[email protected]>
AuthorDate: Wed Feb 11 19:17:55 2026 +0800
HDDS-14605. Remove usage of Netty internal StringUtil (#9747)
---
hadoop-ozone/common/pom.xml | 4 ----
.../org/apache/hadoop/ozone/om/helpers/OzoneIdentityProvider.java | 3 +--
pom.xml | 7 +++++++
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/hadoop-ozone/common/pom.xml b/hadoop-ozone/common/pom.xml
index f98f248ff21..5ac1bf86d43 100644
--- a/hadoop-ozone/common/pom.xml
+++ b/hadoop-ozone/common/pom.xml
@@ -61,10 +61,6 @@
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-common</artifactId>
- </dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
diff --git
a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneIdentityProvider.java
b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneIdentityProvider.java
index 96d05b78d7e..111e1a01ca7 100644
---
a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneIdentityProvider.java
+++
b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneIdentityProvider.java
@@ -19,7 +19,6 @@
import static org.apache.hadoop.ozone.OzoneConsts.OM_S3_CALLER_CONTEXT_PREFIX;
-import io.netty.util.internal.StringUtil;
import java.util.Objects;
import org.apache.hadoop.ipc_.CallerContext;
import org.apache.hadoop.ipc_.IdentityProvider;
@@ -59,7 +58,7 @@ public String makeIdentity(Schedulable schedulable) {
// If the prefix is not present then its set by a user
// and the value should be ignored.
if (Objects.nonNull(callerContext) &&
- !StringUtil.isNullOrEmpty(callerContext.getContext()) &&
+ callerContext.getContext() != null &&
callerContext.getContext()
.startsWith(OM_S3_CALLER_CONTEXT_PREFIX)) {
return callerContext.getContext()
diff --git a/pom.xml b/pom.xml
index 846117a2dab..d449dae15e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2014,6 +2014,13 @@
<bannedImport>org.eclipse.jetty.util.StringUtil</bannedImport>
</bannedImports>
</restrictImports>
+ <restrictImports>
+ <includeTestCode>true</includeTestCode>
+ <reason>Avoid using private API</reason>
+ <bannedImports>
+ <bannedImport>io.netty.util.internal.**</bannedImport>
+ </bannedImports>
+ </restrictImports>
</rules>
</configuration>
</execution>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]