Apply suggestions from code review

Co-authored-by: CyB3RC0nN0R <kske@outlook.de>
This commit is contained in:
delvh 2020-07-28 08:53:10 +02:00 committed by GitHub
parent 517c840487
commit 0167af54b0
3 changed files with 3 additions and 4 deletions

View File

@ -132,7 +132,7 @@ public class MessageControl extends Label {
fileChooser.setInitialFileName(fileName); fileChooser.setInitialFileName(fileName);
fileChooser.setInitialDirectory(downloadLocation); fileChooser.setInitialDirectory(downloadLocation);
file = fileChooser.showSaveDialog(sceneContext.getStage()); file = fileChooser.showSaveDialog(sceneContext.getStage());
} else file = new File(downloadLocation + (downloadLocation.getName().endsWith("/") ? "" : "/") + fileName); } else file = new File(downloadLocation, fileName);
// A file was selected // A file was selected
if (file != null) try (FileOutputStream fos = new FileOutputStream(file)) { if (file != null) try (FileOutputStream fos = new FileOutputStream(file)) {

View File

@ -23,7 +23,7 @@ import envoy.client.ui.SceneContext;
public class DownloadSettingsPane extends SettingsPane { public class DownloadSettingsPane extends SettingsPane {
/** /**
* Constructs a new {@code DownloadSettingsPane} * Constructs a new {@code DownloadSettingsPane}.
* *
* @param sceneContext the {@code SceneContext} used to block input to the * @param sceneContext the {@code SceneContext} used to block input to the
* {@link javafx.stage.Stage} used in Envoy * {@link javafx.stage.Stage} used in Envoy
@ -62,5 +62,4 @@ public class DownloadSettingsPane extends SettingsPane {
vbox.getChildren().add(hbox); vbox.getChildren().add(hbox);
getChildren().add(vbox); getChildren().add(vbox);
} }
} }

View File

@ -68,8 +68,8 @@ public class Attachment implements Serializable {
*/ */
public Attachment(byte[] data, String name, AttachmentType type) { public Attachment(byte[] data, String name, AttachmentType type) {
this.data = data; this.data = data;
this.type = type;
this.name = name; this.name = name;
this.type = type;
} }
/** /**