From 72d6a5b7d106c855d3eb8d4d374c5b3d853f2043 Mon Sep 17 00:00:00 2001 From: fabio Date: Thu, 18 Jul 2019 20:52:38 +0000 Subject: [PATCH] =?UTF-8?q?fixes=20bug#15038=20dev:=20Lucas=20Silv=C3=A9ri?= =?UTF-8?q?o=20qua:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@95913 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../dao/hibernate/EstacionHibernateDAO.java | 3 +-- .../service/impl/EstacionServiceImpl.java | 14 +++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java index 77af646e1..bdefe6687 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java @@ -30,6 +30,7 @@ import com.rjconsultores.ventaboletos.entidad.Usuario; * @author Administrador */ @Repository("estacionDAO") +@SuppressWarnings({"unchecked", "rawtypes"}) public class EstacionHibernateDAO extends GenericHibernateDAO implements EstacionDAO { @Autowired @@ -187,7 +188,6 @@ public class EstacionHibernateDAO extends GenericHibernateDAO } - @SuppressWarnings("unchecked") @Override public List buscarEstaciones(List lsPuntoVenta) { @@ -214,7 +214,6 @@ public class EstacionHibernateDAO extends GenericHibernateDAO return c.list(); } - @SuppressWarnings("unchecked") public Estacion buscarEstacionDuplicada(String descMac, Integer estacionId) { StringBuilder sQuery = new StringBuilder(); sQuery.append("SELECT e ") diff --git a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java index f6800ab86..cfc805ff9 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java @@ -62,9 +62,17 @@ public class EstacionServiceImpl implements EstacionService { esMacDuplicado = Boolean.TRUE; } if (esMacDuplicado) { - throw new BusinessException(Labels.getLabel("estacionServiceImpl.msg.macDuplicado") + "\n" - + Labels.getLabel("estacionServiceImpl.msg.macDuplicado.descricaoEstacao") + nomeEstacao + "\n" - + Labels.getLabel("estacionServiceImpl.msg.macDuplicado.numeroCaixa") + numeroCaixa, Boolean.TRUE); + + StringBuilder msg = new StringBuilder(); + msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado") ); + msg.append( "\n" ); + msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado.descricaoEstacao") ); + msg.append( nomeEstacao ); + msg.append( "\n" ); + msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado.numeroCaixa") ); + msg.append( numeroCaixa.toString() ); + + throw new BusinessException( msg.toString()); } boolean esCajaDuplicado = false;