This commit is contained in:
Burning_TNT
2023-08-02 23:17:08 +08:00
committed by GitHub
parent 61165dd71d
commit 42e88fe6f5
2 changed files with 4 additions and 4 deletions

View File

@@ -170,7 +170,7 @@ public class ModUpdatesPage extends BorderPane implements DecoratorPage {
csvTable.write(Files.newOutputStream(path));
FXUtils.showFileInExplorer(path);
}).whenComplete(exception -> {
}).whenComplete(Schedulers.javafx() ,exception -> {
if (exception == null) {
Controllers.dialog(path.toString(), i18n("message.success"));
} else {

View File

@@ -91,11 +91,10 @@ public final class InfiniteSizeList<T> extends ArrayList<T> {
}
T previous = super.get(index);
super.set(index, element);
if (previous != null) { // !null -> !null
super.set(index, element);
return previous;
} else { // null -> !null
super.set(index, element);
if (index >= this.actualSize) {
this.actualSize = index + 1;
}
@@ -104,8 +103,9 @@ public final class InfiniteSizeList<T> extends ArrayList<T> {
}
}
@SuppressWarnings("unchecked")
private void allocate0(int index) {
super.ensureCapacity(index + 1);
this.addAll(Lang.immutableListOf((T[])new Object[index + 1 - super.size()]));
}
@Override