Skip to content

Commit

Permalink
Revert "[Publisher] check for lenght!=0 strings" (#121)
Browse files Browse the repository at this point in the history
* Revert "[Publisher] check for lenght!=0 strings"

This reverts commit bc84227. It proved
unnecessary to also check for string lenght. The previously existing
checks are actually sufficient.

* [Publisher] Remove trailing blanks
  • Loading branch information
schmandr authored Sep 14, 2023
1 parent 7a1c055 commit 9f547d3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions gretl/src/main/java/ch/so/agi/gretl/tasks/Publisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Expand Down

0 comments on commit 9f547d3

Please sign in to comment.