You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by fr...@apache.org on 2025/06/04 07:33:07 UTC
(kafka) branch trunk updated: MINOR: Remove unnecessary checks. (#19891)
This is an automated email from the ASF dual-hosted git repository.
frankvicky pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new d783f73288d MINOR: Remove unnecessary checks. (#19891)
d783f73288d is described below
commit d783f73288d7373be03fc305348c9f7c804bd651
Author: Xuan-Zhang Gong <go...@gmail.com>
AuthorDate: Wed Jun 4 15:33:01 2025 +0800
MINOR: Remove unnecessary checks. (#19891)
The `String.split` method never returns an array containing null
elements.
Reviewers: TengYao Chi <fr...@apache.org>, Ken Huang
<s7...@gmail.com>, Lan Ding <is...@163.com>
---
.../main/java/org/apache/kafka/common/utils/ChildFirstClassLoader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clients/src/main/java/org/apache/kafka/common/utils/ChildFirstClassLoader.java b/clients/src/main/java/org/apache/kafka/common/utils/ChildFirstClassLoader.java
index 9a891e08463..ff422bbe538 100644
--- a/clients/src/main/java/org/apache/kafka/common/utils/ChildFirstClassLoader.java
+++ b/clients/src/main/java/org/apache/kafka/common/utils/ChildFirstClassLoader.java
@@ -48,7 +48,7 @@ public class ChildFirstClassLoader extends URLClassLoader {
private static URL[] classpathToURLs(String classPath) {
ArrayList<URL> urls = new ArrayList<>();
for (String path : classPath.split(File.pathSeparator)) {
- if (path == null || path.trim().isEmpty())
+ if (path.trim().isEmpty())
continue;
File file = new File(path);