mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-07 17:28:03 +08:00
Fixed memory leak when using Export
Also fixes an issue where players with partially same name get wrong json URL
This commit is contained in:
parent
f16bd6a565
commit
0cfd98a127
@ -44,4 +44,9 @@ public class ExportPaths {
|
||||
this.replace.add(replace);
|
||||
this.with.add(with);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
this.replace.clear();
|
||||
this.with.clear();
|
||||
}
|
||||
}
|
@ -84,6 +84,7 @@ public class NetworkPageExporter extends FileExporter {
|
||||
exportRequiredResources(toDirectory);
|
||||
exportJSON(toDirectory, server);
|
||||
exportHtml(toDirectory);
|
||||
exportPaths.clear();
|
||||
}
|
||||
|
||||
private void exportHtml(Path toDirectory) throws IOException, GenerationException {
|
||||
|
@ -89,6 +89,7 @@ public class PlayerPageExporter extends FileExporter {
|
||||
Path playerDirectory = toDirectory.resolve("player/" + toFileName(playerName));
|
||||
exportJSON(playerDirectory, playerUUID, playerName);
|
||||
exportHtml(playerDirectory, playerUUID);
|
||||
exportPaths.clear();
|
||||
}
|
||||
|
||||
private void exportHtml(Path playerDirectory, UUID playerUUID) throws IOException, GenerationException, NotFoundException {
|
||||
|
@ -87,6 +87,7 @@ public class PlayersPageExporter extends FileExporter {
|
||||
exportRequiredResources(toDirectory);
|
||||
exportJSON(toDirectory);
|
||||
exportHtml(toDirectory);
|
||||
exportPaths.clear();
|
||||
}
|
||||
|
||||
private void exportHtml(Path toDirectory) throws IOException, GenerationException {
|
||||
|
@ -89,6 +89,7 @@ public class ServerPageExporter extends FileExporter {
|
||||
exportRequiredResources(toDirectory);
|
||||
exportJSON(toDirectory, server);
|
||||
exportHtml(toDirectory, server);
|
||||
exportPaths.clear();
|
||||
}
|
||||
|
||||
private void exportHtml(Path toDirectory, Server server) throws IOException, NotFoundException, GenerationException {
|
||||
|
Loading…
Reference in New Issue
Block a user