Skip to content

Commit

Permalink
Revert "换 LinkedList 节省 RAM"
Browse files Browse the repository at this point in the history
This reverts commit 3f68e0f.
  • Loading branch information
Ghost-chu committed Nov 26, 2024
1 parent 3f68e0f commit 470962c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public ConnectorData getConnectorData() {
}

private void handleDownloads(Context ctx) {
List<DownloadRecord> records = new LinkedList<>();
List<DownloadRecord> records = new ArrayList<>();
List<Integer> filter = ctx.queryParams("filter").stream().map(Integer::parseInt).collect(Collectors.toList());
for (Download download : pluginInterface.getDownloadManager().getDownloads()) {
boolean shouldAddToResultSet = filter.isEmpty() || filter.contains(download.getState());
Expand All @@ -303,7 +303,7 @@ private void handleDownloads(Context ctx) {

public void handleBans(Context ctx) {
boolean includeNonPBH = Boolean.parseBoolean(ctx.queryParam("includeNonPBH"));
List<String> banned = new LinkedList<>();
List<String> banned = new ArrayList<>();
for (IPBanned bannedIP : pluginInterface.getIPFilter().getBannedIPs()) {
if (!includeNonPBH) {
if (!PBH_IDENTIFIER.equals(bannedIP.getBannedTorrentName())) {
Expand Down

0 comments on commit 470962c

Please sign in to comment.