From a55cc57cb572ffd28ef246cb578ae5079964cafa Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 9 Feb 2022 13:27:17 +0100 Subject: [PATCH] SEBSERV-273 fixed --- .../ch/ethz/seb/sebserver/gui/widget/WidgetFactory.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/widget/WidgetFactory.java b/src/main/java/ch/ethz/seb/sebserver/gui/widget/WidgetFactory.java index b6848887..08f18eaa 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/widget/WidgetFactory.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/widget/WidgetFactory.java @@ -542,10 +542,6 @@ public class WidgetFactory { return input; } -// public Text numberInput(final Composite content, final Consumer numberCheck, final LocTextKey label) { -// return numberInput(content, numberCheck, false, label); -// } - public Text numberInput( final Composite content, final Consumer numberCheck, @@ -563,6 +559,9 @@ public class WidgetFactory { if (numberCheck != null) { numberInput.addListener(SWT.Verify, event -> { final String value = event.text; + if (StringUtils.isBlank(value)) { + return; + } try { numberCheck.accept(value); } catch (final Exception e) {