8028234: Remove unused methods in sun.misc.JavaAWTAccess
authormchung
Wed, 13 Nov 2013 07:49:42 -0800
changeset 21663 f364900c7cc5
parent 21662 b37eb0c9db8d
child 21664 81740736e62f
8028234: Remove unused methods in sun.misc.JavaAWTAccess Reviewed-by: art, dfuchs, lancea
jdk/src/share/classes/sun/awt/AppContext.java
jdk/src/share/classes/sun/misc/JavaAWTAccess.java
jdk/test/java/util/logging/TestAppletLoggerContext.java
--- a/jdk/src/share/classes/sun/awt/AppContext.java	Wed Nov 13 11:46:05 2013 +0100
+++ b/jdk/src/share/classes/sun/awt/AppContext.java	Wed Nov 13 07:49:42 2013 -0800
@@ -820,30 +820,6 @@
     // Set up JavaAWTAccess in SharedSecrets
     static {
         sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() {
-            public Object get(Object key) {
-                AppContext ac = getAppContext();
-                return (ac == null) ? null : ac.get(key);
-            }
-            public void put(Object key, Object value) {
-                AppContext ac = getAppContext();
-                if (ac != null) {
-                    ac.put(key, value);
-                }
-            }
-            public void remove(Object key) {
-                AppContext ac = getAppContext();
-                if (ac != null) {
-                    ac.remove(key);
-                }
-            }
-            public boolean isDisposed() {
-                AppContext ac = getAppContext();
-                return (ac == null) ? true : ac.isDisposed();
-            }
-            public boolean isMainAppContext() {
-                return (numAppContexts.get() == 1 && mainAppContext != null);
-            }
-
             private boolean hasRootThreadGroup(final AppContext ecx) {
                 return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
                     @Override
--- a/jdk/src/share/classes/sun/misc/JavaAWTAccess.java	Wed Nov 13 11:46:05 2013 +0100
+++ b/jdk/src/share/classes/sun/misc/JavaAWTAccess.java	Wed Nov 13 07:49:42 2013 -0800
@@ -33,12 +33,4 @@
     // or running in the main app context, returns null.
     // Otherwise, returns the AppContext of the calling applet.
     public Object getAppletContext();
-
-    // convenience methods to cache objects in the current thread group's
-    // AppContext
-    public Object get(Object key);
-    public void put(Object key, Object value);
-    public void remove(Object key);
-    public boolean isDisposed();
-    public boolean isMainAppContext();
 }
--- a/jdk/test/java/util/logging/TestAppletLoggerContext.java	Wed Nov 13 11:46:05 2013 +0100
+++ b/jdk/test/java/util/logging/TestAppletLoggerContext.java	Wed Nov 13 07:49:42 2013 -0800
@@ -113,16 +113,6 @@
 
             @Override
             public Object getAppletContext() { return active ? exc : null; }
-            @Override
-            public Object get(Object o) { return exc.get(o); }
-            @Override
-            public void put(Object o, Object o1) { exc.put(o, o1); }
-            @Override
-            public void remove(Object o) { exc.remove(o); }
-            @Override
-            public boolean isDisposed() { return false; }
-            @Override
-            public boolean isMainAppContext() { return !active || exc == null; }
         }
 
         final static JavaAWTAccessStub javaAwtAccess = new JavaAWTAccessStub();