From 7d1b22967de41f89d1afeef6dc6cefc4c8626375 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Mon, 29 Jul 2019 15:50:19 +0200 Subject: [PATCH] fix dubles --- hsarback/src/de/hsadmin/pillar/JsonPillarServlet.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hsarback/src/de/hsadmin/pillar/JsonPillarServlet.java b/hsarback/src/de/hsadmin/pillar/JsonPillarServlet.java index 4f88ff4..5bfbc58 100644 --- a/hsarback/src/de/hsadmin/pillar/JsonPillarServlet.java +++ b/hsarback/src/de/hsadmin/pillar/JsonPillarServlet.java @@ -2,9 +2,10 @@ package de.hsadmin.pillar; import java.io.IOException; import java.io.PrintWriter; -import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Set; +import java.util.TreeSet; import javax.persistence.EntityManager; import javax.persistence.Query; @@ -49,7 +50,7 @@ public class JsonPillarServlet extends HttpServlet { hiveQuery.setParameter("hive", hiveName); final Object hiveResult = hiveQuery.getSingleResult(); final Hive hive = (Hive) hiveResult; - final List dnsZones = new ArrayList(); + final Set dnsZones = new TreeSet(); final Query pacsQuery = em.createQuery("SELECT p FROM Pacs p WHERE p.hive.name = :hive AND p.basepac.name = 'PAC/WEB'"); pacsQuery.setParameter("hive", hiveName); final List pacsResult = pacsQuery.getResultList();