mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Improve logging of finalize() methods
This commit is contained in:
parent
18ac83cf8c
commit
efb9a5f517
2 changed files with 7 additions and 1 deletions
|
@ -404,9 +404,13 @@ public class PingManager extends Manager {
|
|||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
LOGGER.fine("finalizing PingManager: Shutting down executor service");
|
||||
try {
|
||||
executorService.shutdown();
|
||||
} finally {
|
||||
} catch (Throwable t) {
|
||||
LOGGER.log(Level.WARNING, "finalize() threw throwable", t);
|
||||
}
|
||||
finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue