33 |
|
// dependencies across tests |
34 |
|
Thread current = Thread.currentThread(); |
35 |
|
ThreadGroup tg = current.getThreadGroup(); |
36 |
– |
assertNull(Thread.getDefaultUncaughtExceptionHandler()); |
37 |
– |
assertEquals(tg, current.getUncaughtExceptionHandler()); |
36 |
|
MyHandler eh = new MyHandler(); |
39 |
– |
Thread.setDefaultUncaughtExceptionHandler(eh); |
40 |
– |
assertEquals(eh, current.getUncaughtExceptionHandler()); |
41 |
– |
assertEquals(eh, Thread.getDefaultUncaughtExceptionHandler()); |
42 |
– |
Thread.setDefaultUncaughtExceptionHandler(null); |
43 |
– |
assertNull(Thread.getDefaultUncaughtExceptionHandler()); |
37 |
|
assertEquals(tg, current.getUncaughtExceptionHandler()); |
38 |
|
current.setUncaughtExceptionHandler(eh); |
39 |
|
assertEquals(eh, current.getUncaughtExceptionHandler()); |