Fix format the endpoint name with empty string (#12508)

This commit is contained in:
mrproliu 2024-08-06 09:52:30 +08:00 committed by GitHub
parent 28f3dfa6b1
commit 9b17ff1efe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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;
}