fix dubles

This commit is contained in:
Peter Hormanns 2019-07-29 15:50:19 +02:00
parent 66724f2c6b
commit 7d1b22967d

View File

@ -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<String> dnsZones = new ArrayList<String>();
final Set<String> dnsZones = new TreeSet<String>();
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();