summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNick Hudson <nick.hudson@isode.com>2015-07-22 10:08:43 (GMT)
committerNick Hudson <nick.hudson@isode.com>2015-07-22 14:14:30 (GMT)
commita6e8d22d0686d860df735082c151f71157567e06 (patch)
tree614f6f6244e3695ad2765e567b0cba0b35969c28 /src
parente98df2cfcd3bc553b16c139a7d2adfcbe672b540 (diff)
downloadstroke-a6e8d22d0686d860df735082c151f71157567e06.zip
stroke-a6e8d22d0686d860df735082c151f71157567e06.tar.bz2
Tidy up finalize method in SimpleEventLoop
If the finalize() ever gets called, it should, by convention, invoke the superclass finalize() method. This change makes it do that. Test-information: Unit tests still pass Change-Id: I0171cb1b6e1cce61a4c3140f669585f14e797dbd
Diffstat (limited to 'src')
-rw-r--r--src/com/isode/stroke/eventloop/SimpleEventLoop.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/isode/stroke/eventloop/SimpleEventLoop.java b/src/com/isode/stroke/eventloop/SimpleEventLoop.java
index a471457..c3919eb 100644
--- a/src/com/isode/stroke/eventloop/SimpleEventLoop.java
+++ b/src/com/isode/stroke/eventloop/SimpleEventLoop.java
@@ -26,11 +26,16 @@ public class SimpleEventLoop extends EventLoop {
@Override
protected void finalize() throws Throwable {
- synchronized (eventsMutex_) {
- if (!events_.isEmpty()) {
- System.err.println("Warning: Pending events in SimpleEventLoop at finalize time");
- }
- }
+ try {
+ synchronized (eventsMutex_) {
+ if (!events_.isEmpty()) {
+ System.err.println("Warning: Pending events in SimpleEventLoop at finalize time");
+ }
+ }
+ }
+ finally {
+ super.finalize();
+ }
}
public void run() {