From 3136f60d94f54fb95e5559d37c5176b24609f501 Mon Sep 17 00:00:00 2001 From: Francis Dong Date: Tue, 27 Oct 2020 12:01:46 +0800 Subject: [PATCH] fix: fixed no gateway group problem --- src/main/java/we/plugin/stat/StatPluginFilter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/we/plugin/stat/StatPluginFilter.java b/src/main/java/we/plugin/stat/StatPluginFilter.java index e90557a..27c7f80 100644 --- a/src/main/java/we/plugin/stat/StatPluginFilter.java +++ b/src/main/java/we/plugin/stat/StatPluginFilter.java @@ -83,9 +83,12 @@ public class StatPluginFilter extends PluginFilter { @PostConstruct public void init() { Iterator it = gatewayGroupService.currentGatewayGroupSet.iterator(); - currentGatewayGroups = it.next(); while (it.hasNext()) { - currentGatewayGroups = currentGatewayGroups + ',' + it.next(); + if(StringUtils.isBlank(currentGatewayGroups)) { + currentGatewayGroups = it.next(); + }else { + currentGatewayGroups = currentGatewayGroups + ',' + it.next(); + } } }