Revert "synchronizedList must be in a synchronized block when iterating"

This reverts commit 1f12fc5e91.
This commit is contained in:
PrototypeTrousers
2022-11-08 18:00:30 -03:00
parent 8c29eeecdc
commit 5b2c6658c0
+3 -2
View File
@@ -70,6 +70,7 @@ public class ItemRepo {
public IAEItemStack getReferenceItem(int idx) { public IAEItemStack getReferenceItem(int idx) {
idx += this.src.getCurrentScroll() * this.rowSize; idx += this.src.getCurrentScroll() * this.rowSize;
if (idx >= this.view.size()) { if (idx >= this.view.size()) {
return null; return null;
} }
@@ -218,8 +219,8 @@ public class ItemRepo {
return view; return view;
}).thenAcceptAsync(view -> { }).thenAcceptAsync(view -> {
this.updated = true; this.view.clear();
this.asyncUpdatedView.addAll(view); this.view.addAll(view);
}).thenRunAsync(() -> { }).thenRunAsync(() -> {
this.searchTask = null; // Prevent redundant cancellation this.searchTask = null; // Prevent redundant cancellation
}); });