6607310: InputContext may cause loading of swing classes even for non-Swing applets
authorpeytoia
Mon, 08 Sep 2008 11:49:49 +0900
changeset 1311 2b1552286d23
parent 1310 edc39463f896
child 1312 880799c54c4d
6607310: InputContext may cause loading of swing classes even for non-Swing applets Reviewed-by: okutsu
jdk/src/share/classes/sun/awt/im/CompositionArea.java
jdk/src/share/classes/sun/awt/im/InputContext.java
--- a/jdk/src/share/classes/sun/awt/im/CompositionArea.java	Mon Sep 08 10:44:57 2008 +0900
+++ b/jdk/src/share/classes/sun/awt/im/CompositionArea.java	Mon Sep 08 11:49:49 2008 +0900
@@ -56,7 +56,8 @@
  * @author JavaSoft International
  */
 
-public class CompositionArea extends JPanel implements InputMethodListener {
+// This class is final due to the 6607310 fix. Refer to the CR for details.
+public final class CompositionArea extends JPanel implements InputMethodListener {
 
     private CompositionAreaHandler handler;
 
--- a/jdk/src/share/classes/sun/awt/im/InputContext.java	Mon Sep 08 10:44:57 2008 +0900
+++ b/jdk/src/share/classes/sun/awt/im/InputContext.java	Mon Sep 08 11:49:49 2008 +0900
@@ -297,7 +297,7 @@
          */
         synchronized (source.getTreeLock()) {
             synchronized (this) {
-                if (source instanceof CompositionArea) {
+                if ("sun.awt.im.CompositionArea".equals(source.getClass().getName())) {
                     // no special handling for this one
                 } else if (getComponentWindow(source) instanceof InputMethodWindow) {
                     // no special handling for this one either