Skip to content

Commit

Permalink
PopScreenController: minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Sep 20, 2017
1 parent 8ec663e commit d83f1f9
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ public void activateDialog(String popupId, String actionPrefix,
* Make the popup visible, setting the keyboard focus.
*/
Screen screen = nifty.getCurrentScreen();
if (screen == null) {
throw new NullPointerException();
}
Element focusElement;
if (focusElementId == null) {
focusElement = null;
Expand Down Expand Up @@ -302,9 +305,8 @@ void dialogCommit() {
closeActiveDialog();

} else {
@SuppressWarnings("unchecked")
ListBox<String> listBox
= dialogElement.findNiftyControl("#box", ListBox.class);
ListBox listBox;
listBox = dialogElement.findNiftyControl("#box", ListBox.class);
TextField textField = dialogElement.findNiftyControl("#textfield",
TextField.class);

Expand Down

0 comments on commit d83f1f9

Please sign in to comment.