6607310: InputContext may cause loading of swing classes even for non-Swing applets
Reviewed-by: okutsu
--- 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