Ground One Theory

/*
* Decompiled with CFR 0_79.
*
* Could not load the following classes:
*  java.io.PrintStream
*  java.lang.Class
*  java.lang.Exception
*  java.lang.IllegalThreadStateException
*  java.lang.Object
*  java.lang.String
*  java.lang.System
*  java.lang.Thread
*  java.lang.ThreadGroup
*  java.lang.reflect.Method
*/
package com.opera;

import java.io.PrintStream;

class AppContextAdapter {
    Object appContext = null;
    ThreadGroup threadGroup = null;
    boolean isDisposed = false;

    AppContextAdapter() {
    }

    void create() {
        this.threadGroup = Thread.currentThread().getThreadGroup();
        try {
            Class sunTk = Class.forName((String)”sun.awt.SunToolkit”);
            if (sunTk == null) return;
            Method method = sunTk.getMethod(“createNewAppContext”, (Class[])null);
            this.appContext = method.invoke((Object)null, (Object[])null);
        }
        catch (Exception ex) {
            // empty catch block
        }
    }

    void dispose() throws IllegalThreadStateException {
        block8 : {
            try {
                if (this.appContext != null) {
                    Method method = this.appContext.getClass().getMethod(“dispose”, (Class[])null);
                    method.invoke(this.appContext, (Object[])null);
                    break block8;
                }
                if (this.threadGroup.parentOf(Thread.currentThread().getThreadGroup())) {
                    throw new IllegalThreadStateException(“Current Thread is contained within AppContext to be disposed.”);
                }
                AppContextAdapter method = this;
                synchronized (method) {
                    if (this.isDisposed) {
                        return;
                    }
                    this.isDisposed = true;
                }
                this.disposeFrames();
                this.interruptThreads();
            }
            catch (Exception ex) {
                ex.printStackTrace(System.err);
            }
        }
    }

    private void disposeFrames() {
    }

    private void interruptThreads() {
        this.threadGroup.interrupt();
    }
}
   

Advertisements