From d69f2528793abe41d074b9d889f602bfb7d5e5d3 Mon Sep 17 00:00:00 2001 From: gleimar Date: Fri, 29 Apr 2016 20:55:14 +0000 Subject: [PATCH] =?UTF-8?q?refatora=C3=A7=C3=A3o=20fixes=20bug#7405?= 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/Web/trunk/ventaboletos@55423 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../web/utilerias/IPValidatorUtileria.java | 11 ----------- .../ventaboletos/web/utilerias/MyAppInit.java | 12 +++++++++++- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java index 698456536..f35115aa7 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java @@ -73,17 +73,6 @@ public class IPValidatorUtileria { return null; } - public static boolean ipExternoException(String ipServidor) { - if (ipServidor.equals(getIpExternalAWS())) { - log.info(" IP capturado: " + getIpExternalAWS()); - log.info(" IP: " + ipServidor); - - return true; - } else { - return false; - } - } - public static void main(String[] args) { System.out.println("Current IP address : " + IPValidatorUtileria.getIp()); System.out.println("Current IP address AWS: " + IPValidatorUtileria.getIpExternalAWS()); diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java index 7e69ba123..9b3b27e82 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java @@ -74,7 +74,17 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit { return false; } - return (IPValidatorUtileria.ipExternoException(ipConstante)); + String ipExternalAWS = IPValidatorUtileria.getIpExternalAWS(); + + if (ipConstante.equals(IPValidatorUtileria.getIpExternalAWS())) { + log.info(" IP capturado: " + ipExternalAWS); + log.info(" IP: " + ipConstante); + + return true; + } else { + return false; + } + } private Integer[] horaExecucion() {