This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b17ff1efe Fix format the endpoint name with empty string (#12508)
9b17ff1efe is described below

commit 9b17ff1efeab7a20c870839f59eb0e6af485cd3f
Author: mrproliu <[email protected]>
AuthorDate: Tue Aug 6 09:52:30 2024 +0800

    Fix format the endpoint name with empty string (#12508)
---
 docs/en/changes/changes.md                                              | 1 +
 .../org/apache/skywalking/oap/server/core/config/NamingControl.java     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 3b4d290aa2..c0b22df024 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -48,6 +48,7 @@
 * Bump up graphql-java to 21.5.
 * Add Unknown Node when receive Kubernetes peer address is not aware in 
current cluster.
 * Fix CounterWindow concurrent increase cause NPE by PriorityQueue
+* Fix format the endpoint name with empty string.
 
 #### UI
 
diff --git 
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/config/NamingControl.java
 
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/config/NamingControl.java
index 9a3bbf6784..350d668ed1 100644
--- 
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/config/NamingControl.java
+++ 
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/config/NamingControl.java
@@ -96,7 +96,7 @@ public class NamingControl implements Service {
      * @return the string, which length less than or equals {@link 
#endpointNameMaxLength};
      */
     public String formatEndpointName(String serviceName, String endpointName) {
-        if (StringUtil.isEmpty(serviceName) || endpointName == null) {
+        if (StringUtil.isEmpty(serviceName) || 
StringUtil.isEmpty(endpointName)) {
             return endpointName;
         }
 

Reply via email to