changeset 643:3d8640f597b2

6607310: InputContext may cause loading of swing classes even for non-Swing applets Reviewed-by: okutsu
author peytoia
date Mon, 08 Sep 2008 11:49:49 +0900
parents 77dc7ca7879f
children 9b8e20a3c5f0
files src/share/classes/sun/awt/im/CompositionArea.java src/share/classes/sun/awt/im/InputContext.java
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/awt/im/CompositionArea.java	Mon Sep 08 10:44:57 2008 +0900
+++ b/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/src/share/classes/sun/awt/im/InputContext.java	Mon Sep 08 10:44:57 2008 +0900
+++ b/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