allow EpPolicyTemplate without conditions 22/41122/2
authorMatej Perina <matej.perina@pantheon.sk>
Thu, 30 Jun 2016 08:53:02 +0000 (10:53 +0200)
committerMatej Perina <matej.perina@pantheon.sk>
Wed, 6 Jul 2016 13:08:54 +0000 (13:08 +0000)
Change-Id: Id659d39e110cf217bcef0d224ebc4d75708273f4
Signed-off-by: Matej Perina <matej.perina@pantheon.sk>
sxp-mapper/src/main/java/org/opendaylight/groupbasedpolicy/sxp/mapper/impl/dao/EpPolicyTemplateValueKeyFactory.java

index 4f757f7df00c12fbeb43a0e21f30a88a7fc362d6..5bbac19ec07c1cabfe153613ea3f48d8450f1561 100644 (file)
@@ -46,7 +46,9 @@ public class EpPolicyTemplateValueKeyFactory {
 
     public EpPolicyTemplateValueKey sortValueKeyLists(final EpPolicyTemplateValueKey existingKey) {
         Collections.sort(existingKey.getEpgId(), epgIdOrdering);
-        Collections.sort(existingKey.getConditionName(), conditionOrdering);
+        if (existingKey.getConditionName() != null) {
+            Collections.sort(existingKey.getConditionName(), conditionOrdering);
+        }
         return existingKey;
     }