Skip to content

Commit

Permalink
Fixed irrelevant FindBugs warning for fields are initialized with @FXML
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Oct 6, 2014
1 parent e8b47d5 commit b235f8e
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ public class InviteWindow {
@FXML private AnchorPane noButton;
@FXML private AnchorPane yesButton;

private final InviteRequest message;
private final GameClientLobby lobby;

public InviteWindow(InviteRequest message, GameClientLobby lobby) {
try {
FXMLLoader loader = new FXMLLoader(getClass().getResource("InviteWindowDocument.fxml"));
Expand All @@ -25,14 +22,15 @@ public InviteWindow(InviteRequest message, GameClientLobby lobby) {
throw new RuntimeException(e);
}

this.message = message;
this.lobby = lobby;

this.initializeLabels(message, lobby);
}

private void initializeLabels(InviteRequest message, GameClientLobby lobby) {
this.nameLabel.setText(message.getName());
this.yesButton.setOnMouseClicked(lobby::acceptGameRequest);
this.noButton.setOnMouseClicked(lobby::declineGameRequest);
}

public AnchorPane getRootPane() {
return this.rootPane;
}
Expand Down

0 comments on commit b235f8e

Please sign in to comment.