Skip to content

Commit

Permalink
Merge pull request #3268 from mapfish/mem-related-fixes
Browse files Browse the repository at this point in the history
Memory related cleanups
  • Loading branch information
sebr72 authored Apr 25, 2024
2 parents 3ff0f9b + 69e4c50 commit f67ee91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ public void close() {
try {
this.body.close();
} catch (IOException e) {
// ignored
LOGGER.warn("Failed to close body", e);
} finally {
this.body = null;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,6 @@ public String getStatusText() {
return this.response.getStatusLine().getReasonPhrase();
}

@Override
protected void finalize() throws Throwable {
super.finalize();
close();
}

@Override
public void close() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ protected Tile compute() {
TilePreparationTask.class.getName()
+ ".read."
+ StatsUtils.quotePart(this.tileRequest.getURI().getHost());
LOGGER.debug("\n\t{} -- {}", this.tileRequest.getMethod(), this.tileRequest.getURI());
LOGGER.debug("{} -- {}", this.tileRequest.getMethod(), this.tileRequest.getURI());
final Timer.Context timerDownload = this.registry.timer(baseMetricName).time();
try (ClientHttpResponse response = this.tileRequest.execute()) {
final HttpStatus statusCode = response.getStatusCode();
Expand Down

0 comments on commit f67ee91

Please sign in to comment.