package com.bugsnag;

import java.lang.Thread.UncaughtExceptionHandler;

class ExceptionHandler implements UncaughtExceptionHandler {
    private UncaughtExceptionHandler originalHandler;
    private Client client;

    public static void install(Client client) {
        UncaughtExceptionHandler currentHandler = Thread.getDefaultUncaughtExceptionHandler();
        if(currentHandler instanceof ExceptionHandler) {
            currentHandler = ((ExceptionHandler)currentHandler).getOriginalHandler();
        }

        Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(currentHandler, client));
    }

    public static void remove() {
        UncaughtExceptionHandler currentHandler = Thread.getDefaultUncaughtExceptionHandler();
        if(currentHandler instanceof ExceptionHandler) {
            Thread.setDefaultUncaughtExceptionHandler(((ExceptionHandler)currentHandler).getOriginalHandler());
        }
    }

    public ExceptionHandler(UncaughtExceptionHandler originalHandler, Client client) {
        this.originalHandler = originalHandler;
        this.client = client;
    }

    public void uncaughtException(Thread t, Throwable e) {
        client.autoNotify(e);
        originalHandler.uncaughtException(t, e);
    }

    public UncaughtExceptionHandler getOriginalHandler() {
        return this.originalHandler;
    }
}
@@ -465,36 +465,33 @@
 currentHandler).
-getO
+o
 riginalHandler()
@@ -484,26 +484,24 @@
 ginalHandler
-()
 ;%0A        %7D%0A
@@ -880,20 +880,17 @@
 andler).
-getO
+o
 riginalH
@@ -895,18 +895,16 @@
 lHandler
-()
 );%0A     
@@ -1172,24 +1172,24 @@
 oNotify(e);%0A
+
         orig
@@ -1234,109 +1234,6 @@
    %7D
-%0A%0A    public UncaughtExceptionHandler getOriginalHandler() %7B%0A        return this.originalHandler;%0A    %7D
 %0A%7D

Remove unnecessary getter