From 77fc48aaa73b40e271e9d7e93bf7e6ce899afd22 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Wed, 16 Nov 2016 13:25:26 +0100 Subject: [PATCH] code formatting --- .../core/qserv/EntityProcessorFactory.java | 20 ++++++++----------- .../qserv/QueueStatusReceiverServlet.java | 1 - .../hsadmin/mods/pac/PacProcessorFactory.java | 5 +---- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/hsarback/src/de/hsadmin/core/qserv/EntityProcessorFactory.java b/hsarback/src/de/hsadmin/core/qserv/EntityProcessorFactory.java index 79e3a0d..43d9919 100644 --- a/hsarback/src/de/hsadmin/core/qserv/EntityProcessorFactory.java +++ b/hsarback/src/de/hsadmin/core/qserv/EntityProcessorFactory.java @@ -4,19 +4,15 @@ import javax.persistence.EntityManager; import de.hsadmin.core.model.AbstractEntity; -/** - * Most processor factories need only these methods. - * - * @author peter - */ -public interface EntityProcessorFactory { - public Processor createCreateProcessor(EntityManager em, - T entity) throws ProcessorException; +public interface EntityProcessorFactory +{ + public Processor + createCreateProcessor(EntityManager em, T entity) throws ProcessorException; - public Processor createUpdateProcessor(EntityManager em, - T newEntity) throws ProcessorException; + public Processor + createUpdateProcessor(EntityManager em, T newEntity) throws ProcessorException; - public Processor createDeleteProcessor(EntityManager em, - T entity) throws ProcessorException; + public Processor + createDeleteProcessor(EntityManager em, T entity) throws ProcessorException; } diff --git a/hsarback/src/de/hsadmin/core/qserv/QueueStatusReceiverServlet.java b/hsarback/src/de/hsadmin/core/qserv/QueueStatusReceiverServlet.java index 1d70163..e57b9b0 100644 --- a/hsarback/src/de/hsadmin/core/qserv/QueueStatusReceiverServlet.java +++ b/hsarback/src/de/hsadmin/core/qserv/QueueStatusReceiverServlet.java @@ -117,7 +117,6 @@ public class QueueStatusReceiverServlet extends HttpServlet transaction = new Transaction("statusreceiver"); transaction.beginTransaction(); EntityManager em = transaction.getEntityManager(); - // merging detachedQT directly makes Hibernate run into an endless recursion (stack overflow) em.clear(); QueueTask persistentQT = em.find(QueueTask.class, detachedQT.getId()); persistentQT.assign(detachedQT); diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java index 0e03363..6709fe1 100644 --- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java @@ -115,10 +115,7 @@ public class PacProcessorFactory implements EntityProcessorFactory { } private Processor createNetworkInterfacesProc(final Hive hive) throws ProcessorException { -// VelocityProcessor interfacesProc = new VelocityProcessor("/de/hsadmin/mods/pac/interfaces.vm", hive, "/etc/network/interfaces", true); - final VelocityProcessor pacIPv4Proc = new VelocityProcessor("/de/hsadmin/mods/pac/pac-addr-ipv4.vm", hive, "/etc/network/pac-addr-ipv4", true); - return pacIPv4Proc; -// return new CompoundProcessor(interfacesProc, pacIPv4Proc); + return new VelocityProcessor("/de/hsadmin/mods/pac/pac-addr-ipv4.vm", hive, "/etc/network/pac-addr-ipv4", true); } private Processor createIPTablesProc() {