From fa48c176a1c6e30c6d63d7f6259378d0adc1b86c Mon Sep 17 00:00:00 2001 From: "leon.li" Date: Thu, 1 Sep 2016 19:04:04 +0800 Subject: [PATCH] fix a bug --- .../dianping/phoenix/lb/service/DefaultNginxServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/camel-admin/src/main/java/com/dianping/phoenix/lb/service/DefaultNginxServiceImpl.java b/camel-admin/src/main/java/com/dianping/phoenix/lb/service/DefaultNginxServiceImpl.java index 01aa776..02222af 100644 --- a/camel-admin/src/main/java/com/dianping/phoenix/lb/service/DefaultNginxServiceImpl.java +++ b/camel-admin/src/main/java/com/dianping/phoenix/lb/service/DefaultNginxServiceImpl.java @@ -140,6 +140,11 @@ public class DefaultNginxServiceImpl implements NginxService { if (resultPair.getKey()) { String namesStr = resultPair.getValue().getMessage(); + + if (StringUtils.isEmpty(namesStr) || "".equals(namesStr.trim())) { + return new HashSet(); + } + Set vsNames = new HashSet(Arrays.asList(namesStr.split("\t"))); logger.info("[success][Agent][listVS]");