Skip to content

Commit a9c8102

Browse files
committed
Update JavaFX
1 parent 3ae99c4 commit a9c8102

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,5 @@ gradle-app.setting
146146
# gradle/wrapper/gradle-wrapper.properties
147147

148148
.vscode
149+
.idea/modules.xml
150+
.idea/modules

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
2121

2222
plugins {
2323
id 'application'
24-
id 'com.github.ben-manes.versions' version '0.48.0'
24+
id 'com.github.ben-manes.versions' version '0.49.0'
2525
id 'org.beryx.jlink' version '3.0.0'
2626
id 'org.openjfx.javafxplugin' version '0.1.0'
2727

@@ -62,7 +62,7 @@ dependencies {
6262
}
6363

6464
javafx {
65-
version = '21'
65+
version = '21.0.1'
6666
modules = [ 'javafx.controls', 'javafx.fxml' ]
6767
}
6868

src/main/java/airsquared/blobsaver/app/Analytics.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ private static String getUUID() {
100100
return Prefs.getAnalyticsUUID();
101101
}
102102

103+
@SuppressWarnings("ThrowablePrintedToSystemOut")
103104
private static void sendRequest(String url) {
104105
try {
105106
Network.makeVoidRequest(url);

src/main/java/airsquared/blobsaver/app/Controller.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,29 @@ public void initialize() {
8080
.orElse(FXCollections.emptyObservableList()));
8181
versionLabel.textProperty().bind(deviceTypeChoiceBox.valueProperty().map(Devices::getOSNameForType)
8282
.orElse("Version"));
83-
deviceList.getSelectionModel().selectedItemProperty().addListener((a,b, device) -> loadSavedDevice(device));
83+
deviceList.getSelectionModel().selectedItemProperty().addListener((_,_, device) -> loadSavedDevice(device));
8484
deleteDeviceMenu.textProperty().bind(Bindings.concat("Remove ",
8585
Bindings.when(deleteDeviceMenu.disableProperty())
8686
.then("Saved Device")
8787
.otherwise(Bindings.concat('"', deviceList.getSelectionModel().selectedItemProperty(), '"'))));
8888
deleteDeviceMenu.disableProperty().bind(deviceList.getSelectionModel().selectedItemProperty().isNull());
8989
backgroundSettingsMenu.textProperty().bind(Bindings.when(backgroundSettingsButton.selectedProperty())
9090
.then("Hide Background Settings").otherwise("Show Background Settings"));
91-
backgroundSettingsMenu.setOnAction(__ -> backgroundSettingsButton.fire());
91+
backgroundSettingsMenu.setOnAction(_ -> backgroundSettingsButton.fire());
9292
savedDevicesLabel.textProperty().bind(Bindings.when(backgroundSettingsButton.selectedProperty())
9393
.then("Select Devices").otherwise("Saved Devices"));
9494
backgroundSettingsButton.textProperty().bind(Bindings.when(backgroundSettingsButton.selectedProperty())
9595
.then("Back").otherwise("Auto-Save Settings"));
9696
savedDevicesVBox.effectProperty().bind(Bindings.when(backgroundSettingsButton.selectedProperty())
9797
.then(Utils.borderGlow).otherwise((DropShadow) null));
98-
allSignedVersionsCheckBox.selectedProperty().addListener(__ -> {
98+
allSignedVersionsCheckBox.selectedProperty().addListener(_ -> {
9999
if (!allSignedVersionsCheckBox.isSelected()) {
100100
saveToTSSSaverCheckBox.setSelected(false);
101101
saveToSHSHHostCheckBox.setSelected(false);
102102
betaCheckBox.setSelected(false);
103103
}
104104
});
105-
betaCheckBox.selectedProperty().addListener(__ -> betaCheckBox.setEffect(null));
105+
betaCheckBox.selectedProperty().addListener(_ -> betaCheckBox.setEffect(null));
106106
switch (Prefs.getDarkMode()) {
107107
case DISABLED -> darkDisabled.setSelected(true);
108108
case SYNC_WITH_OS -> darkSync.setSelected(true);
@@ -357,7 +357,7 @@ public void aboutMenuHandler(Event ignored) {
357357
new ButtonType("License"), new ButtonType("Github Repo"), ButtonType.CLOSE);
358358
alert.initOwner(Main.primaryStage);
359359
alert.initModality(Modality.WINDOW_MODAL);
360-
alert.getDialogPane().getScene().getWindow().focusedProperty().addListener((a, b, focused) -> {
360+
alert.getDialogPane().getScene().getWindow().focusedProperty().addListener((_,_, focused) -> {
361361
if (!focused) alert.close();
362362
});
363363
//Activate default behavior for close button
@@ -423,7 +423,7 @@ public void backgroundSettingsHandler() {
423423
if (backgroundSettingsButton.isSelected()) {
424424
deviceList.setCellFactory(CheckBoxListCell.forListView(device -> {
425425
final SimpleBooleanProperty property = new SimpleBooleanProperty(device.isBackground());
426-
property.addListener((a, b, c) -> addBackgroundHandler(device, property));
426+
property.addListener((_,_,_) -> addBackgroundHandler(device, property));
427427
return property;
428428
}));
429429
} else {
@@ -482,7 +482,7 @@ public void chooseTimeToRunHandler() {
482482
}
483483

484484
public void startBackgroundHandler() {
485-
if (Background.isBackgroundEnabled()) { //stops background if already in background
485+
if (Background.isBackgroundEnabled()) {
486486
Background.stopBackground();
487487
updateBackgroundSettings();
488488
} else {
@@ -595,12 +595,12 @@ public void readApnonce() {
595595
Utils.forEachButton(alert2, button -> button.setDisable(true));
596596

597597
var task = new LibimobiledeviceUtil.GetApnonceTask(false);
598-
task.setOnSucceeded(__ -> {
598+
task.setOnSucceeded(_ -> {
599599
apnonceField.setText(task.getApnonceResult());
600600
generatorField.setText(task.getGeneratorResult());
601601
Utils.forEachButton(alert2, button -> button.setDisable(false));
602602
});
603-
task.setOnFailed(__ -> {
603+
task.setOnFailed(_ -> {
604604
task.getException().printStackTrace();
605605
if (task.getException() instanceof LibimobiledeviceUtil.LibimobiledeviceException e) {
606606
e.showErrorAlert();
@@ -691,14 +691,14 @@ private TSS createTSS(String runningAlertTitle) {
691691
Utils.forEachButton(runningAlert, button -> button.setDisable(true));
692692
runningAlert.getDialogPane().getScene().getWindow().setOnCloseRequest(Event::consume);
693693

694-
tss.setOnScheduled(__ -> runningAlert.show());
695-
tss.setOnSucceeded(__ -> {
694+
tss.setOnScheduled(_ -> runningAlert.show());
695+
tss.setOnSucceeded(_ -> {
696696
runningAlert.close();
697697
Alert alert = new Alert(Alert.AlertType.INFORMATION, tss.getValue());
698698
alert.setHeaderText("Success!");
699699
alert.showAndWait();
700700
});
701-
tss.setOnFailed(__ -> {
701+
tss.setOnFailed(_ -> {
702702
runningAlert.close();
703703
tss.getException().printStackTrace();
704704
parseException(tss.getException());

src/main/java/airsquared/blobsaver/app/LibimobiledeviceUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ protected Void call() throws LibimobiledeviceException {
184184
}
185185

186186
/**
187-
* @return false if task was cancelled during the Thread.sleep
187+
* @return false if task was canceled during the Thread.sleep
188188
*/
189189
private static boolean sleep(long millis) {
190190
try {
@@ -354,7 +354,7 @@ private static void throwIfNeeded(int errorCode, ErrorCodeType errorType) throws
354354

355355
public static class LibimobiledeviceException extends Exception {
356356

357-
public final ErrorCodeType errorType;
357+
private final ErrorCodeType errorType;
358358
public final int errorCode;
359359
public final boolean reportable;
360360

src/main/java/airsquared/blobsaver/app/Main.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,11 @@ static void setJNALibraryPath() {
9191
}
9292

9393
/**
94-
* Apple decided use some old distrusted certificate for the iOS 15.5 IPSW, causing this error:
94+
* Apple decided to use some old distrusted certificate for the iOS 15.5 IPSW, causing this error:
9595
* {@code javax.net.ssl.SSLHandshakeException: TLS Server certificate issued after 2019-12-31 and anchored by a distrusted legacy Symantec root CA: CN=GeoTrust Primary Certification Authority - G2, OU=(c) 2007 GeoTrust Inc. - For authorized use only, O=GeoTrust Inc., C=US }
96-
*
96+
* <p>
9797
* This uses reflection/unsafe to make the certificate "trusted" anyway.
98-
*s
99-
* Writing to private static final fields is from https://stackoverflow.com/a/61150853/5938387
98+
* Writing to private static final fields is from <a href="https://stackoverflow.com/a/61150853/5938387">...</a>
10099
*/
101100
@SuppressWarnings({"Java9ReflectionClassVisibility", "deprecation"})
102101
static void fixCertificateError() {

0 commit comments

Comments
 (0)