From be7889a4cfe4bbf3986d0477494fc2c279a0c59d Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 15 Apr 2020 09:04:11 +0200 Subject: [PATCH] SEBSERV-118 fix --- .../sebconfig/impl/converter/KioskModeConverter.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/KioskModeConverter.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/KioskModeConverter.java index f5dfa6ad..1ab1d450 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/KioskModeConverter.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/KioskModeConverter.java @@ -92,12 +92,16 @@ public class KioskModeConverter implements AttributeValueConverter { final String template) throws IOException { final String val = (ATTR_NAME_CREATE_NEW_DESKTOP.equals(name)) - ? value == null || value.getValue() == null || "0".equals(value.getValue()) + ? (value == null || value.getValue() == null) ? Constants.TRUE_STRING - : Constants.FALSE_STRING - : value == null || value.getValue() == null || "0".equals(value.getValue()) + : "0".equals(value.getValue()) + ? Constants.TRUE_STRING + : Constants.FALSE_STRING + : (value == null || value.getValue() == null) ? Constants.FALSE_STRING - : Constants.TRUE_STRING; + : "1".equals(value.getValue()) + ? Constants.TRUE_STRING + : Constants.FALSE_STRING; out.write(Utils.toByteArray(String.format(template, name, val))); }