Skip to content

Commit

Permalink
Fix "Could not find: 'null'" error
Browse files Browse the repository at this point in the history
  • Loading branch information
airsquared committed Mar 30, 2019
1 parent 725fcf7 commit 8455588
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/airsquared/blobsaver/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -915,11 +915,11 @@ public void readInfo() {
@SuppressWarnings("Duplicates")
public void goButtonHandler() {
boolean doReturn = false;
if (!identifierCheckBox.isSelected() && "".equals(deviceTypeChoiceBox.getValue())) {
if (!identifierCheckBox.isSelected() && (deviceTypeChoiceBox.getValue() == null || "".equals(deviceTypeChoiceBox.getValue()))) {
deviceTypeChoiceBox.setEffect(errorBorder);
doReturn = true;
}
if (!identifierCheckBox.isSelected() && "".equals(deviceModelChoiceBox.getValue())) {
if (!identifierCheckBox.isSelected() && ("".equals(deviceModelChoiceBox.getValue()))) {
deviceModelChoiceBox.setEffect(errorBorder);
doReturn = true;
}
Expand Down Expand Up @@ -957,7 +957,7 @@ private static boolean isTextFieldInvalid(CheckBox checkBox, TextField textField
}

private static boolean isTextFieldInvalid(boolean isTextFieldRequired, TextField textField) {
if (isTextFieldRequired && "".equals(textField.getText())) {
if (isTextFieldRequired && (textField.getText() == null || "".equals(textField.getText()))) {
textField.setEffect(errorBorder);
return true;
}
Expand Down

0 comments on commit 8455588

Please sign in to comment.