From 9f547d3440f73c3d58a949c11f1c59cde9e68758 Mon Sep 17 00:00:00 2001 From: Andreas Schmid Date: Thu, 14 Sep 2023 10:29:17 +0200 Subject: [PATCH] Revert "[Publisher] check for lenght!=0 strings" (#121) * Revert "[Publisher] check for lenght!=0 strings" This reverts commit bc84227a7f05fce45ca3b25170a50334bdde5ec5. It proved unnecessary to also check for string lenght. The previously existing checks are actually sufficient. * [Publisher] Remove trailing blanks --- .../main/java/ch/so/agi/gretl/tasks/Publisher.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gretl/src/main/java/ch/so/agi/gretl/tasks/Publisher.java b/gretl/src/main/java/ch/so/agi/gretl/tasks/Publisher.java index f093b0c1..a669b746 100644 --- a/gretl/src/main/java/ch/so/agi/gretl/tasks/Publisher.java +++ b/gretl/src/main/java/ch/so/agi/gretl/tasks/Publisher.java @@ -183,14 +183,12 @@ public void publishAll() { settings.setValue(ch.interlis.ili2c.gui.UserSettings.HTTP_PROXY_PORT, proxyPort.toString()); } SimiSvcApi simiSvc=null; - if(kgdiService!=null) { + if(kgdiService!=null) { if (!kgdiService.getUrl().isEmpty() && !kgdiService.getUser().isEmpty() && !kgdiService.getPassword().isEmpty()) { - if (kgdiService.getUrl().trim().length()!=0 && kgdiService.getUser().trim().length()!=0 && kgdiService.getPassword().trim().length()!=0) { - simiSvc=new SimiSvcClient(); - simiSvc.setup(kgdiService.getUrl(), kgdiService.getUser(), kgdiService.getPassword()); - if(kgdiTokenService!=null) { - simiSvc.setupTokenService(kgdiTokenService.getUrl(), kgdiTokenService.getUser(), kgdiTokenService.getPassword()); - } + simiSvc=new SimiSvcClient(); + simiSvc.setup(kgdiService.getUrl(), kgdiService.getUser(), kgdiService.getPassword()); + if(kgdiTokenService!=null) { + simiSvc.setupTokenService(kgdiTokenService.getUrl(), kgdiTokenService.getUser(), kgdiTokenService.getPassword()); } } }