From ff751b3a661061e9b340612ba1eb0d8c4a0f2533 Mon Sep 17 00:00:00 2001 From: Mengyi Zhou Date: Tue, 8 Mar 2016 19:55:24 +0800 Subject: [PATCH] fix validation --- .../service/model/handler/impl/DefaultGroupValidator.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultGroupValidator.java b/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultGroupValidator.java index bd9255cd..8511688f 100644 --- a/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultGroupValidator.java +++ b/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultGroupValidator.java @@ -93,18 +93,16 @@ public class DefaultGroupValidator implements GroupValidator { else virtualServerIds.add(vs.getId()); } - if (groupPaths.contains(vs.getId() + vs.getVersion() + groupVirtualServer.getPath())) + if (groupPaths.contains(vs.getId() + groupVirtualServer.getPath())) throw new ValidationException("Duplicate path \"" + groupVirtualServer.getPath() + "\" is found on virtual server " + vs.getId() + " from post entity."); else - groupPaths.add(vs.getId() + vs.getVersion() + groupVirtualServer.getPath()); + groupPaths.add(vs.getId() + groupVirtualServer.getPath()); } for (RelGroupVsDo relGroupVsDo : rGroupVsDao.findAllByVses(virtualServerIds.toArray(new Long[virtualServerIds.size()]), RGroupVsEntity.READSET_FULL)) { if (groupId.equals(relGroupVsDo.getGroupId())) continue; if (groupPaths.contains(relGroupVsDo.getVsId() + relGroupVsDo.getPath())) throw new ValidationException("Duplicate path \"" + relGroupVsDo.getPath() + "\" is found on virtual server " + relGroupVsDo.getVsId() + " from existing entities."); - else - groupPaths.add(relGroupVsDo.getVsId() + relGroupVsDo.getPath()); } }