diff --git a/src/main/java/de/aservo/confapi/fisheye/service/SettingsHttpServiceImpl.java b/src/main/java/de/aservo/confapi/fisheye/service/SettingsHttpServiceImpl.java index c92eca7..b62fe1d 100644 --- a/src/main/java/de/aservo/confapi/fisheye/service/SettingsHttpServiceImpl.java +++ b/src/main/java/de/aservo/confapi/fisheye/service/SettingsHttpServiceImpl.java @@ -48,11 +48,25 @@ public SettingsHttpBean getSettings() { public SettingsHttpBean setSettings( SettingsHttpBean settings) { - server.setContext(settings.getWebContext()); - http.setBind(settings.getBindAddress()); - http.setProxyScheme(settings.getProxyScheme()); - http.setProxyHost(settings.getProxyHost()); - http.setProxyPort(BigInteger.valueOf(settings.getProxyPort())); + if(settings.getWebContext() != null){ + server.setContext(settings.getWebContext()); + } + + if(settings.getBindAddress() != null){ + http.setBind(settings.getBindAddress()); + } + + if(settings.getProxyScheme() != null){ + http.setProxyScheme(settings.getProxyScheme()); + } + + if(settings.getProxyHost() != null){ + http.setProxyHost(settings.getProxyHost()); + } + + if(settings.getProxyPort() != null){ + http.setProxyPort(BigInteger.valueOf(settings.getProxyPort())); + } return getSettings(); }