DataFormUI: fix boolean form field logic
@@ -82,7 +82,11 @@ public class DataFormUI extends JPanel {
if (type.equals(FormField.Type.bool)) {
BooleanFormField booleanField = field.ifPossibleAsOrThrow(BooleanFormField.class);
- boolean isSelected = booleanField.getValueAsBoolean();
+ Boolean isSelected = booleanField.getValueAsBoolean();
+ // TODO: Remove this logic once Spark uses Smack 4.4.5.
+ if (isSelected == null) {
+ isSelected = false;
+ }
JCheckBox box = new JCheckBox(label);
box.setSelected(isSelected);
addField(label, box, variable);
