Skip to content

Commit

Permalink
Merge pull request #186 from JLLeitschuh/fix/textAreaSocketPreviewView
Browse files Browse the repository at this point in the history
Fix TextAreaSocketPreviewView after Optional Refactor
  • Loading branch information
ThomasJClark committed Dec 8, 2015
2 parents 6bb940f + 043a884 commit e70e2aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public TextAreaSocketPreviewView(EventBus eventBus, OutputSocket<T> socket) {

this.setStyle("-fx-pref-width: 20em;");

this.text = new TextArea(socket.getValue().toString());
this.text = new TextArea(socket.getValue().orElse((T)"").toString());
text.setEditable(false);

this.setContent(text);
Expand All @@ -35,7 +35,7 @@ public void onSocketChanged(SocketChangedEvent event) {
final Socket socket = event.getSocket();

if (socket == this.getSocket()) {
this.text.setText(socket.getValue().toString());
this.text.setText(socket.getValue().orElse("").toString());
}
}
}

0 comments on commit e70e2aa

Please sign in to comment.