aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-09-08 03:27:31 +0800
committerjkim <jkim@FreeBSD.org>2012-09-08 03:27:31 +0800
commit799651d0e6b0b3b4db6c776a3bffe4de324f8e75 (patch)
treecfc473ae995b2e3edb27fc42a3c43251b22f297a /java
parent9433aaa9d570cfc64af237083a9c0eed0a0891e5 (diff)
downloadfreebsd-ports-gnome-799651d0e6b0b3b4db6c776a3bffe4de324f8e75.tar.gz
freebsd-ports-gnome-799651d0e6b0b3b4db6c776a3bffe4de324f8e75.tar.zst
freebsd-ports-gnome-799651d0e6b0b3b4db6c776a3bffe4de324f8e75.zip
- Update security patch to fix CVE-2012-0547 and CVE-2012-1682.
- Catch up with icedtea.classpath.org server changes for distfiles.
Diffstat (limited to 'java')
-rw-r--r--java/openjdk6/Makefile6
-rw-r--r--java/openjdk6/files/patch-security5057
2 files changed, 4932 insertions, 131 deletions
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile
index e69d7a350f2f..4eed2e3ead4e 100644
--- a/java/openjdk6/Makefile
+++ b/java/openjdk6/Makefile
@@ -7,16 +7,18 @@
PORTNAME= openjdk6
PORTVERSION= b25
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
http://download.java.net/jaxp/openjdk/jdk6/:jaxp \
http://download.java.net/glassfish/components/jax-ws/openjdk/jdk6/:jaxws \
https://java.net/downloads/jax-ws/OpenJDK6/:jaf \
- http://icedtea.classpath.org/builds/icedtea6/src/ \
http://icedtea.classpath.org/download/drops/:jaxp \
http://icedtea.classpath.org/download/drops/:jaxws \
http://icedtea.classpath.org/download/drops/:jaf \
+ http://icedtea.wildebeest.org/download/drops/:jaxp \
+ http://icedtea.wildebeest.org/download/drops/:jaxws \
+ http://icedtea.wildebeest.org/download/drops/:jaf \
${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \
http://download.java.net/openjdk/jtreg/promoted/4.1/${JTREGVERSION}/:jtreg
DISTNAME= openjdk-6-src-${PORTVERSION}-${OPENJDK_BUILDDATE}
diff --git a/java/openjdk6/files/patch-security b/java/openjdk6/files/patch-security
index 216d3916a561..99daf6f5b42a 100644
--- a/java/openjdk6/files/patch-security
+++ b/java/openjdk6/files/patch-security
@@ -1,5 +1,5 @@
---- corba/src/share/classes/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
@@ -16,8 +16,8 @@
// LEGEND:
// s_req = send_request r_rep = receive_reply
// s_pol = send_poll r_exc = receive_exception
---- corba/src/share/classes/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
@@ -34,8 +34,8 @@
// LEGEND:
// r_rsc = receive_request_service_contexts
// r_req = receive_request
---- corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
@@ -69,8 +69,8 @@
}
// Used by TOAFactory.shutdown to unexport all targets for this
---- corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
@@ -96,8 +96,8 @@
POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
POAFactory factory = pm.getFactory() ;
factory.unregisterPOAForServant(poa, s);
---- corba/src/share/classes/com/sun/corba/se/impl/oa/toa/TOAFactory.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/oa/toa/TOAFactory.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/oa/toa/TOAFactory.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/oa/toa/TOAFactory.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
@@ -116,8 +116,8 @@
}
}
---- corba/src/share/classes/com/sun/corba/se/impl/orb/ParserTable.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/orb/ParserTable.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/orb/ParserTable.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/orb/ParserTable.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -136,8 +136,8 @@
}
private ParserTable() {
---- corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
@@ -217,8 +217,8 @@
static {
kSpecialPrimitives.put("int","long");
---- corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
@@ -298,8 +298,8 @@
static {
kSpecialPrimitives.put("int","long");
---- corba/src/share/classes/com/sun/corba/se/impl/protocol/LocalClientRequestDispatcherBase.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/protocol/LocalClientRequestDispatcherBase.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/protocol/LocalClientRequestDispatcherBase.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/protocol/LocalClientRequestDispatcherBase.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
@@ -316,8 +316,8 @@
protected synchronized Object initialValue() {
return Boolean.TRUE;
}
---- corba/src/share/classes/com/sun/corba/se/impl/util/RepositoryId.java.orig 2012-05-01 17:14:05.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/impl/util/RepositoryId.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/impl/util/RepositoryId.java 2012-05-01 17:14:05.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/impl/util/RepositoryId.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
@@ -406,8 +406,8 @@
static {
kSpecialPrimitives.put("int","long");
---- corba/src/share/classes/com/sun/corba/se/spi/logging/CORBALogDomains.java.orig 2012-05-01 17:14:06.000000000 -0400
-+++ corba/src/share/classes/com/sun/corba/se/spi/logging/CORBALogDomains.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/com/sun/corba/se/spi/logging/CORBALogDomains.java 2012-05-01 17:14:06.000000000 -0400
++++ corba/src/share/classes/com/sun/corba/se/spi/logging/CORBALogDomains.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
@@ -424,8 +424,8 @@
public static final String RPC = "rpc" ;
---- corba/src/share/classes/sun/rmi/rmic/iiop/IDLNames.java.orig 2012-05-01 17:14:07.000000000 -0400
-+++ corba/src/share/classes/sun/rmi/rmic/iiop/IDLNames.java 2012-06-13 12:52:46.000000000 -0400
+--- corba/src/share/classes/sun/rmi/rmic/iiop/IDLNames.java 2012-05-01 17:14:07.000000000 -0400
++++ corba/src/share/classes/sun/rmi/rmic/iiop/IDLNames.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -486,8 +486,8 @@
// We gotta convert. Have we already started?
---- corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java.orig 2012-05-01 17:14:07.000000000 -0400
-+++ corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java 2012-06-13 12:53:31.000000000 -0400
+--- corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java 2012-05-01 17:14:07.000000000 -0400
++++ corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -518,8 +518,8 @@
p.pOln("}");
}
}
---- hotspot/src/share/vm/ci/ciField.cpp.orig 2012-05-01 17:15:10.000000000 -0400
-+++ hotspot/src/share/vm/ci/ciField.cpp 2012-06-13 12:55:31.000000000 -0400
+--- hotspot/src/share/vm/ci/ciField.cpp 2012-05-01 17:15:10.000000000 -0400
++++ hotspot/src/share/vm/ci/ciField.cpp 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -597,8 +597,8 @@
return true;
}
---- hotspot/src/share/vm/ci/ciField.hpp.orig 2012-05-01 17:15:10.000000000 -0400
-+++ hotspot/src/share/vm/ci/ciField.hpp 2012-06-13 12:54:48.000000000 -0400
+--- hotspot/src/share/vm/ci/ciField.hpp 2012-05-01 17:15:10.000000000 -0400
++++ hotspot/src/share/vm/ci/ciField.hpp 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -616,8 +616,8 @@
ciConstant _constant_value;
// Used for will_link
---- hotspot/src/share/vm/classfile/verifier.cpp.orig 2012-05-01 17:15:10.000000000 -0400
-+++ hotspot/src/share/vm/classfile/verifier.cpp 2012-06-13 12:55:56.000000000 -0400
+--- hotspot/src/share/vm/classfile/verifier.cpp 2012-05-01 17:15:10.000000000 -0400
++++ hotspot/src/share/vm/classfile/verifier.cpp 2012-09-05 19:34:26.000000000 -0400
@@ -1871,10 +1871,10 @@
VerificationType type = current_frame->pop_stack(
VerificationType::reference_check(), CHECK_VERIFY(this));
@@ -632,8 +632,8 @@
verify_error(bci, "Bad <init> method call");
return;
}
---- hotspot/src/share/vm/compiler/compilerOracle.cpp.orig 2012-05-01 17:15:10.000000000 -0400
-+++ hotspot/src/share/vm/compiler/compilerOracle.cpp 2012-06-13 12:52:55.000000000 -0400
+--- hotspot/src/share/vm/compiler/compilerOracle.cpp 2012-05-01 17:15:10.000000000 -0400
++++ hotspot/src/share/vm/compiler/compilerOracle.cpp 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -692,8 +692,8 @@
if (lists[PrintCommand] != NULL) {
if (PrintAssembly) {
warning("CompileCommand and/or .hotspot_compiler file contains 'print' commands, but PrintAssembly is also enabled");
---- hotspot/src/share/vm/compiler/compilerOracle.hpp.orig 2012-05-01 17:15:10.000000000 -0400
-+++ hotspot/src/share/vm/compiler/compilerOracle.hpp 2012-06-13 12:52:55.000000000 -0400
+--- hotspot/src/share/vm/compiler/compilerOracle.hpp 2012-05-01 17:15:10.000000000 -0400
++++ hotspot/src/share/vm/compiler/compilerOracle.hpp 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -712,8 +712,8 @@
// Reads from file and adds to lists
static void parse_from_file();
---- hotspot/src/share/vm/opto/runtime.cpp.orig 2012-05-01 17:15:13.000000000 -0400
-+++ hotspot/src/share/vm/opto/runtime.cpp 2012-06-13 12:52:55.000000000 -0400
+--- hotspot/src/share/vm/opto/runtime.cpp 2012-05-01 17:15:13.000000000 -0400
++++ hotspot/src/share/vm/opto/runtime.cpp 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -731,8 +731,8 @@
const char* title = "HotSpot Runtime Error";
const char* question = "Do you want to exclude compilation of this method in future runs?";
if (os::message_box(title, question)) {
---- hotspot/src/share/vm/runtime/arguments.cpp.orig 2012-05-01 17:15:13.000000000 -0400
-+++ hotspot/src/share/vm/runtime/arguments.cpp 2012-06-13 12:52:55.000000000 -0400
+--- hotspot/src/share/vm/runtime/arguments.cpp 2012-05-01 17:15:13.000000000 -0400
++++ hotspot/src/share/vm/runtime/arguments.cpp 2012-09-05 19:34:26.000000000 -0400
@@ -2956,12 +2956,14 @@
}
}
@@ -748,8 +748,8 @@
if (PrintVMOptions) {
for (index = 0; index < args->nOptions; index++) {
---- jaxp/build.properties.orig 2012-05-01 17:15:26.000000000 -0400
-+++ jaxp/build.properties 2012-06-13 12:55:23.000000000 -0400
+--- jaxp/build.properties 2012-05-01 17:15:26.000000000 -0400
++++ jaxp/build.properties 2012-09-05 19:34:26.000000000 -0400
@@ -77,6 +77,9 @@
# Where patches to drop bundle sources live
patches.dir=patches
@@ -760,8 +760,8 @@
# Sanity information
sanity.info= Sanity Settings:${line.separator}\
ant.home=${ant.home}${line.separator}\
---- jaxp/patches/jaxp_src/7157609.patch.orig 2012-06-13 12:55:23.000000000 -0400
-+++ jaxp/patches/jaxp_src/7157609.patch 2012-06-13 12:55:23.000000000 -0400
+--- jaxp/patches/jaxp_src/7157609.patch 1969-12-31 19:00:00.000000000 -0500
++++ jaxp/patches/jaxp_src/7157609.patch 2012-09-05 19:34:26.000000000 -0400
@@ -0,0 +1,38 @@
+# HG changeset patch
+# User joehw
@@ -801,8 +801,8 @@
+ // REVISIT: should we remove this error reporting?
+ if (scanningTextDecl && state != STATE_DONE) {
+ reportFatalError("MorePseudoAttributes", null);
---- jdk/make/com/sun/jmx/Makefile.orig 2012-05-01 17:17:59.000000000 -0400
-+++ jdk/make/com/sun/jmx/Makefile 2012-06-13 12:53:31.000000000 -0400
+--- jdk/make/com/sun/jmx/Makefile 2012-05-01 17:17:59.000000000 -0400
++++ jdk/make/com/sun/jmx/Makefile 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -832,8 +832,1242 @@
$(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class
$(prep-target)
$(RMIC) -classpath "$(CLASSDESTDIR)" \
---- jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java.orig 2012-05-01 17:18:04.000000000 -0400
-+++ jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/make/sun/Makefile 2012-05-01 17:18:00.000000000 -0400
++++ jdk/make/sun/Makefile 2012-09-05 19:35:34.000000000 -0400
+@@ -64,7 +64,7 @@
+ SUBDIRS = jar security javazic misc net audio $(RENDER_SUBDIR) image \
+ awt splashscreen $(XAWT_SUBDIR) $(MOTIF_SUBDIRS) \
+ $(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
+- font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
++ font jpeg cmm applet rmi $(JDBC_SUBDIR) \
+ jawt text nio launcher management $(ORG_SUBDIR) \
+ native2ascii serialver tools jconsole
+
+--- jdk/make/sun/beans/Makefile 2012-05-01 17:18:00.000000000 -0400
++++ jdk/make/sun/beans/Makefile 2012-09-05 19:35:34.000000000 -0400
+@@ -1,43 +0,0 @@
+-#
+-# Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation. Oracle designates this
+-# particular file as subject to the "Classpath" exception as provided
+-# by Oracle in the LICENSE file that accompanied this code.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+-# or visit www.oracle.com if you need additional information or have any
+-# questions.
+-#
+-
+-#
+-# Makefile for building sun.beans.*
+-#
+-
+-BUILDDIR = ../..
+-PACKAGE = sun.beans
+-PRODUCT = sun
+-include $(BUILDDIR)/common/Defs.gmk
+-
+-#
+-# Files
+-#
+-AUTO_FILES_JAVA_DIRS = sun/beans
+-
+-#
+-# Rules
+-#
+-include $(BUILDDIR)/common/Classes.gmk
+--- jdk/src/share/classes/com/sun/beans/editors/BooleanEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/BooleanEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,76 @@
++/*
++ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++/**
++ * Property editor for a java builtin "boolean" type.
++ */
++
++import java.beans.*;
++
++public class BooleanEditor extends PropertyEditorSupport {
++
++
++ public String getJavaInitializationString() {
++ Object value = getValue();
++ return (value != null)
++ ? value.toString()
++ : "null";
++ }
++
++ public String getAsText() {
++ Object value = getValue();
++ return (value instanceof Boolean)
++ ? getValidName((Boolean) value)
++ : "null";
++ }
++
++ public void setAsText(String text) throws java.lang.IllegalArgumentException {
++ if (text == null) {
++ setValue(null);
++ } else if (isValidName(true, text)) {
++ setValue(Boolean.TRUE);
++ } else if (isValidName(false, text)) {
++ setValue(Boolean.FALSE);
++ } else {
++ throw new java.lang.IllegalArgumentException(text);
++ }
++ }
++
++ public String[] getTags() {
++ return new String[] {getValidName(true), getValidName(false)};
++ }
++
++ // the following method should be localized (4890258)
++
++ private String getValidName(boolean value) {
++ return value ? "True" : "False";
++ }
++
++ private boolean isValidName(boolean value, String name) {
++ return getValidName(value).equalsIgnoreCase(name);
++ }
++}
+--- jdk/src/share/classes/com/sun/beans/editors/ByteEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/ByteEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,48 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++/**
++ * Property editor for a java builtin "byte" type.
++ *
++ */
++
++import java.beans.*;
++
++public class ByteEditor extends NumberEditor {
++
++ public String getJavaInitializationString() {
++ Object value = getValue();
++ return (value != null)
++ ? "((byte)" + value + ")"
++ : "null";
++ }
++
++ public void setAsText(String text) throws IllegalArgumentException {
++ setValue((text == null) ? null : Byte.decode(text));
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/ColorEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/ColorEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,212 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++import java.awt.*;
++import java.beans.*;
++
++public class ColorEditor extends Panel implements PropertyEditor {
++ public ColorEditor() {
++ setLayout(null);
++
++ ourWidth = hPad;
++
++ // Create a sample color block bordered in black
++ Panel p = new Panel();
++ p.setLayout(null);
++ p.setBackground(Color.black);
++ sample = new Canvas();
++ p.add(sample);
++ sample.reshape(2, 2, sampleWidth, sampleHeight);
++ add(p);
++ p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4);
++ ourWidth += sampleWidth + 4 + hPad;
++
++ text = new TextField("", 14);
++ add(text);
++ text.reshape(ourWidth,0,100,30);
++ ourWidth += 100 + hPad;
++
++ choser = new Choice();
++ int active = 0;
++ for (int i = 0; i < colorNames.length; i++) {
++ choser.addItem(colorNames[i]);
++ }
++ add(choser);
++ choser.reshape(ourWidth,0,100,30);
++ ourWidth += 100 + hPad;
++
++ resize(ourWidth,40);
++ }
++
++ public void setValue(Object o) {
++ Color c = (Color)o;
++ changeColor(c);
++ }
++
++ public Dimension preferredSize() {
++ return new Dimension(ourWidth, 40);
++ }
++
++ public boolean keyUp(Event e, int key) {
++ if (e.target == text) {
++ try {
++ setAsText(text.getText());
++ } catch (IllegalArgumentException ex) {
++ // Quietly ignore.
++ }
++ }
++ return (false);
++ }
++
++ public void setAsText(String s) throws java.lang.IllegalArgumentException {
++ if (s == null) {
++ changeColor(null);
++ return;
++ }
++ int c1 = s.indexOf(',');
++ int c2 = s.indexOf(',', c1+1);
++ if (c1 < 0 || c2 < 0) {
++ // Invalid string.
++ throw new IllegalArgumentException(s);
++ }
++ try {
++ int r = Integer.parseInt(s.substring(0,c1));
++ int g = Integer.parseInt(s.substring(c1+1, c2));
++ int b = Integer.parseInt(s.substring(c2+1));
++ Color c = new Color(r,g,b);
++ changeColor(c);
++ } catch (Exception ex) {
++ throw new IllegalArgumentException(s);
++ }
++
++ }
++
++ public boolean action(Event e, Object arg) {
++ if (e.target == choser) {
++ changeColor(colors[choser.getSelectedIndex()]);
++ }
++ return false;
++ }
++
++ public String getJavaInitializationString() {
++ return (this.color != null)
++ ? "new java.awt.Color(" + this.color.getRGB() + ",true)"
++ : "null";
++ }
++
++
++ private void changeColor(Color c) {
++
++ if (c == null) {
++ this.color = null;
++ this.text.setText("");
++ return;
++ }
++
++ color = c;
++
++ text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue());
++
++ int active = 0;
++ for (int i = 0; i < colorNames.length; i++) {
++ if (color.equals(colors[i])) {
++ active = i;
++ }
++ }
++ choser.select(active);
++
++ sample.setBackground(color);
++ sample.repaint();
++
++ support.firePropertyChange("", null, null);
++ }
++
++ public Object getValue() {
++ return color;
++ }
++
++ public boolean isPaintable() {
++ return true;
++ }
++
++ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
++ Color oldColor = gfx.getColor();
++ gfx.setColor(Color.black);
++ gfx.drawRect(box.x, box.y, box.width-3, box.height-3);
++ gfx.setColor(color);
++ gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4);
++ gfx.setColor(oldColor);
++ }
++
++ public String getAsText() {
++ return (this.color != null)
++ ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
++ : "null";
++ }
++
++ public String[] getTags() {
++ return null;
++ }
++
++ public java.awt.Component getCustomEditor() {
++ return this;
++ }
++
++ public boolean supportsCustomEditor() {
++ return true;
++ }
++
++ public void addPropertyChangeListener(PropertyChangeListener l) {
++ support.addPropertyChangeListener(l);
++ }
++
++ public void removePropertyChangeListener(PropertyChangeListener l) {
++ support.removePropertyChangeListener(l);
++ }
++
++
++ private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray",
++ "black", "red", "pink", "orange",
++ "yellow", "green", "magenta", "cyan",
++ "blue"};
++ private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
++ Color.black, Color.red, Color.pink, Color.orange,
++ Color.yellow, Color.green, Color.magenta, Color.cyan,
++ Color.blue};
++
++ private Canvas sample;
++ private int sampleHeight = 20;
++ private int sampleWidth = 40;
++ private int hPad = 5;
++ private int ourWidth;
++
++ private Color color;
++ private TextField text;
++ private Choice choser;
++
++ private PropertyChangeSupport support = new PropertyChangeSupport(this);
++}
+--- jdk/src/share/classes/com/sun/beans/editors/DoubleEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/DoubleEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,41 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++/**
++ * Property editor for a java builtin "double" type.
++ *
++ */
++
++import java.beans.*;
++
++public class DoubleEditor extends NumberEditor {
++
++ public void setAsText(String text) throws IllegalArgumentException {
++ setValue((text == null) ? null : Double.valueOf(text));
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,142 @@
++/*
++ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++package com.sun.beans.editors;
++
++import java.awt.Component;
++import java.awt.Graphics;
++import java.awt.Rectangle;
++import java.beans.PropertyChangeEvent;
++import java.beans.PropertyChangeListener;
++import java.beans.PropertyEditor;
++import java.util.ArrayList;
++import java.util.List;
++
++/**
++ * Property editor for java.lang.Enum subclasses.
++ *
++ * @see PropertyEditor
++ *
++ * @since 1.7
++ *
++ * @author Sergey A. Malenkov
++ */
++public final class EnumEditor implements PropertyEditor {
++ private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
++
++ private final Class type;
++ private final String[] tags;
++
++ private Object value;
++
++ public EnumEditor( Class type ) {
++ Object[] values = type.getEnumConstants();
++ if ( values == null ) {
++ throw new IllegalArgumentException( "Unsupported " + type );
++ }
++ this.type = type;
++ this.tags = new String[values.length];
++ for ( int i = 0; i < values.length; i++ ) {
++ this.tags[i] = ( ( Enum )values[i] ).name();
++ }
++ }
++
++ public Object getValue() {
++ return this.value;
++ }
++
++ public void setValue( Object value ) {
++ if ( ( value != null ) && !this.type.isInstance( value ) ) {
++ throw new IllegalArgumentException( "Unsupported value: " + value );
++ }
++ Object oldValue;
++ PropertyChangeListener[] listeners;
++ synchronized ( this.listeners ) {
++ oldValue = this.value;
++ this.value = value;
++
++ if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) {
++ return; // do not fire event if value is not changed
++ }
++ int size = this.listeners.size();
++ if ( size == 0 ) {
++ return; // do not fire event if there are no any listener
++ }
++ listeners = this.listeners.toArray( new PropertyChangeListener[size] );
++ }
++ PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value );
++ for ( PropertyChangeListener listener : listeners ) {
++ listener.propertyChange( event );
++ }
++ }
++
++ public String getAsText() {
++ return ( this.value != null )
++ ? ( ( Enum )this.value ).name()
++ : "null";
++ }
++
++ public void setAsText( String text ) {
++ setValue( ( text != null )
++ ? Enum.valueOf( this.type, text )
++ : null );
++ }
++
++ public String[] getTags() {
++ return this.tags.clone();
++ }
++
++ public String getJavaInitializationString() {
++ return ( this.value != null )
++ ? this.type.getName() + '.' + ( ( Enum )this.value ).name()
++ : "null";
++ }
++
++ public boolean isPaintable() {
++ return false;
++ }
++
++ public void paintValue( Graphics gfx, Rectangle box ) {
++ }
++
++ public boolean supportsCustomEditor() {
++ return false;
++ }
++
++ public Component getCustomEditor() {
++ return null;
++ }
++
++ public void addPropertyChangeListener( PropertyChangeListener listener ) {
++ synchronized ( this.listeners ) {
++ this.listeners.add( listener );
++ }
++ }
++
++ public void removePropertyChangeListener( PropertyChangeListener listener ) {
++ synchronized ( this.listeners ) {
++ this.listeners.remove( listener );
++ }
++ }
++}
+--- jdk/src/share/classes/com/sun/beans/editors/FloatEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/FloatEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,48 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++/**
++ * Property editor for a java builtin "float" type.
++ *
++ */
++
++import java.beans.*;
++
++public class FloatEditor extends NumberEditor {
++
++ public String getJavaInitializationString() {
++ Object value = getValue();
++ return (value != null)
++ ? value + "F"
++ : "null";
++ }
++
++ public void setAsText(String text) throws IllegalArgumentException {
++ setValue((text == null) ? null : Float.valueOf(text));
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/FontEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/FontEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,218 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++import java.awt.*;
++import java.beans.*;
++
++public class FontEditor extends Panel implements java.beans.PropertyEditor {
++
++ public FontEditor() {
++ setLayout(null);
++
++ toolkit = Toolkit.getDefaultToolkit();
++ fonts = toolkit.getFontList();
++
++ familyChoser = new Choice();
++ for (int i = 0; i < fonts.length; i++) {
++ familyChoser.addItem(fonts[i]);
++ }
++ add(familyChoser);
++ familyChoser.reshape(20, 5, 100, 30);
++
++ styleChoser = new Choice();
++ for (int i = 0; i < styleNames.length; i++) {
++ styleChoser.addItem(styleNames[i]);
++ }
++ add(styleChoser);
++ styleChoser.reshape(145, 5, 70, 30);
++
++ sizeChoser = new Choice();
++ for (int i = 0; i < pointSizes.length; i++) {
++ sizeChoser.addItem("" + pointSizes[i]);
++ }
++ add(sizeChoser);
++ sizeChoser.reshape(220, 5, 70, 30);
++
++ resize(300,40);
++ }
++
++
++ public Dimension preferredSize() {
++ return new Dimension(300, 40);
++ }
++
++ public void setValue(Object o) {
++ font = (Font) o;
++ if (this.font == null)
++ return;
++
++ changeFont(font);
++ // Update the current GUI choices.
++ for (int i = 0; i < fonts.length; i++) {
++ if (fonts[i].equals(font.getFamily())) {
++ familyChoser.select(i);
++ break;
++ }
++ }
++ for (int i = 0; i < styleNames.length; i++) {
++ if (font.getStyle() == styles[i]) {
++ styleChoser.select(i);
++ break;
++ }
++ }
++ for (int i = 0; i < pointSizes.length; i++) {
++ if (font.getSize() <= pointSizes[i]) {
++ sizeChoser.select(i);
++ break;
++ }
++ }
++ }
++
++ private void changeFont(Font f) {
++ font = f;
++ if (sample != null) {
++ remove(sample);
++ }
++ sample = new Label(sampleText);
++ sample.setFont(font);
++ add(sample);
++ Component p = getParent();
++ if (p != null) {
++ p.invalidate();
++ p.layout();
++ }
++ invalidate();
++ layout();
++ repaint();
++ support.firePropertyChange("", null, null);
++ }
++
++ public Object getValue() {
++ return (font);
++ }
++
++ public String getJavaInitializationString() {
++ if (this.font == null)
++ return "null";
++
++ return "new java.awt.Font(\"" + font.getName() + "\", " +
++ font.getStyle() + ", " + font.getSize() + ")";
++ }
++
++ public boolean action(Event e, Object arg) {
++ String family = familyChoser.getSelectedItem();
++ int style = styles[styleChoser.getSelectedIndex()];
++ int size = pointSizes[sizeChoser.getSelectedIndex()];
++ try {
++ Font f = new Font(family, style, size);
++ changeFont(f);
++ } catch (Exception ex) {
++ System.err.println("Couldn't create font " + family + "-" +
++ styleNames[style] + "-" + size);
++ }
++ return (false);
++ }
++
++
++ public boolean isPaintable() {
++ return true;
++ }
++
++ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
++ // Silent noop.
++ Font oldFont = gfx.getFont();
++ gfx.setFont(font);
++ FontMetrics fm = gfx.getFontMetrics();
++ int vpad = (box.height - fm.getAscent())/2;
++ gfx.drawString(sampleText, 0, box.height-vpad);
++ gfx.setFont(oldFont);
++ }
++
++ public String getAsText() {
++ if (this.font == null) {
++ return "null";
++ }
++ StringBuilder sb = new StringBuilder();
++ sb.append(this.font.getName());
++ sb.append(' ');
++
++ boolean b = this.font.isBold();
++ if (b) {
++ sb.append("BOLD");
++ }
++ boolean i = this.font.isItalic();
++ if (i) {
++ sb.append("ITALIC");
++ }
++ if (b || i) {
++ sb.append(' ');
++ }
++ sb.append(this.font.getSize());
++ return sb.toString();
++ }
++
++ public void setAsText(String text) throws IllegalArgumentException {
++ setValue((text == null) ? null : Font.decode(text));
++ }
++
++ public String[] getTags() {
++ return null;
++ }
++
++ public java.awt.Component getCustomEditor() {
++ return this;
++ }
++
++ public boolean supportsCustomEditor() {
++ return true;
++ }
++
++ public void addPropertyChangeListener(PropertyChangeListener l) {
++ support.addPropertyChangeListener(l);
++ }
++
++ public void removePropertyChangeListener(PropertyChangeListener l) {
++ support.removePropertyChangeListener(l);
++ }
++
++ private Font font;
++ private Toolkit toolkit;
++ private String sampleText = "Abcde...";
++
++ private Label sample;
++ private Choice familyChoser;
++ private Choice styleChoser;
++ private Choice sizeChoser;
++
++ private String fonts[];
++ private String[] styleNames = { "plain", "bold", "italic" };
++ private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC };
++ private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 };
++
++ private PropertyChangeSupport support = new PropertyChangeSupport(this);
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/IntegerEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/IntegerEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,42 @@
++/*
++ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++/**
++ * Property editor for a java builtin "int" type.
++ *
++ */
++
++import java.beans.*;
++
++public class IntegerEditor extends NumberEditor {
++
++
++ public void setAsText(String text) throws IllegalArgumentException {
++ setValue((text == null) ? null : Integer.decode(text));
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/LongEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/LongEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,48 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++/**
++ * Property editor for a java builtin "long" type.
++ *
++ */
++
++import java.beans.*;
++
++public class LongEditor extends NumberEditor {
++
++ public String getJavaInitializationString() {
++ Object value = getValue();
++ return (value != null)
++ ? value + "L"
++ : "null";
++ }
++
++ public void setAsText(String text) throws IllegalArgumentException {
++ setValue((text == null) ? null : Long.decode(text));
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/NumberEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/NumberEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,44 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.editors;
++
++/**
++ * Abstract Property editor for a java builtin number types.
++ *
++ */
++
++import java.beans.*;
++
++abstract public class NumberEditor extends PropertyEditorSupport {
++
++ public String getJavaInitializationString() {
++ Object value = getValue();
++ return (value != null)
++ ? value.toString()
++ : "null";
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/ShortEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/ShortEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,49 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++
++package com.sun.beans.editors;
++
++/**
++ * Property editor for a java builtin "short" type.
++ *
++ */
++
++import java.beans.*;
++
++public class ShortEditor extends NumberEditor {
++
++ public String getJavaInitializationString() {
++ Object value = getValue();
++ return (value != null)
++ ? "((short)" + value + ")"
++ : "null";
++ }
++
++ public void setAsText(String text) throws IllegalArgumentException {
++ setValue((text == null) ? null : Short.decode(text));
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/editors/StringEditor.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/editors/StringEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,74 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++
++package com.sun.beans.editors;
++
++import java.beans.*;
++
++public class StringEditor extends PropertyEditorSupport {
++
++ public String getJavaInitializationString() {
++ Object value = getValue();
++ if (value == null)
++ return "null";
++
++ String str = value.toString();
++ int length = str.length();
++ StringBuilder sb = new StringBuilder(length + 2);
++ sb.append('"');
++ for (int i = 0; i < length; i++) {
++ char ch = str.charAt(i);
++ switch (ch) {
++ case '\b': sb.append("\\b"); break;
++ case '\t': sb.append("\\t"); break;
++ case '\n': sb.append("\\n"); break;
++ case '\f': sb.append("\\f"); break;
++ case '\r': sb.append("\\r"); break;
++ case '\"': sb.append("\\\""); break;
++ case '\\': sb.append("\\\\"); break;
++ default:
++ if ((ch < ' ') || (ch > '~')) {
++ sb.append("\\u");
++ String hex = Integer.toHexString((int) ch);
++ for (int len = hex.length(); len < 4; len++) {
++ sb.append('0');
++ }
++ sb.append(hex);
++ } else {
++ sb.append(ch);
++ }
++ break;
++ }
++ }
++ sb.append('"');
++ return sb.toString();
++ }
++
++ public void setAsText(String text) {
++ setValue(text);
++ }
++
++}
+--- jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java 2012-05-01 17:18:02.000000000 -0400
++++ jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -24,6 +24,8 @@
+ */
+ package com.sun.beans.finder;
+
++import static sun.reflect.misc.ReflectUtil.checkPackageAccess;
++
+ /**
+ * This is utility class that provides <code>static</code> methods
+ * to find a class with the specified name using the specified class loader.
+@@ -53,6 +55,7 @@
+ * @see Thread#getContextClassLoader()
+ */
+ public static Class findClass( String name ) throws ClassNotFoundException {
++ checkPackageAccess(name);
+ try {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if ( loader == null ) {
+@@ -93,6 +96,7 @@
+ * @see Class#forName(String,boolean,ClassLoader)
+ */
+ public static Class findClass( String name, ClassLoader loader ) throws ClassNotFoundException {
++ checkPackageAccess(name);
+ if ( loader != null ) {
+ try {
+ return Class.forName( name, false, loader );
+--- jdk/src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 2012-09-05 19:35:34.000000000 -0400
+@@ -0,0 +1,62 @@
++/*
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package com.sun.beans.infos;
++
++import java.beans.*;
++
++/**
++ * BeanInfo descriptor for a standard AWT component.
++ */
++
++public class ComponentBeanInfo extends SimpleBeanInfo {
++ private static final Class beanClass = java.awt.Component.class;
++
++ public PropertyDescriptor[] getPropertyDescriptors() {
++ try {
++ PropertyDescriptor
++ name = new PropertyDescriptor("name", beanClass),
++ background = new PropertyDescriptor("background", beanClass),
++ foreground = new PropertyDescriptor("foreground", beanClass),
++ font = new PropertyDescriptor("font", beanClass),
++ enabled = new PropertyDescriptor("enabled", beanClass),
++ visible = new PropertyDescriptor("visible", beanClass),
++ focusable = new PropertyDescriptor("focusable", beanClass);
++
++ enabled.setExpert(true);
++ visible.setHidden(true);
++
++ background.setBound(true);
++ foreground.setBound(true);
++ font.setBound(true);
++ focusable.setBound(true);
++
++ PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable };
++ return rv;
++ } catch (IntrospectionException e) {
++ throw new Error(e.toString());
++ }
++ }
++}
+--- jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java 2012-05-01 17:18:04.000000000 -0400
++++ jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
@@ -851,8 +2085,183 @@
}
static private
---- jdk/src/share/classes/java/awt/Font.java.orig 2012-05-01 17:18:08.000000000 -0400
-+++ jdk/src/share/classes/java/awt/Font.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/java/awt/AWTEvent.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/AWTEvent.java 2012-09-05 19:35:40.000000000 -0400
+@@ -268,9 +268,21 @@
+ return ev.isSystemGenerated;
+ }
+
++ public void setPosted(AWTEvent ev) {
++ ev.isPosted = true;
++ }
++
+ public AccessControlContext getAccessControlContext(AWTEvent ev) {
+ return ev.getAccessControlContext();
+ }
++
++ public byte[] getBData(AWTEvent ev) {
++ return ev.bdata;
++ }
++
++ public void setBData(AWTEvent ev, byte[] bdata) {
++ ev.bdata = bdata;
++ }
+ });
+ }
+
+--- jdk/src/share/classes/java/awt/CheckboxMenuItem.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/CheckboxMenuItem.java 2012-09-05 19:35:40.000000000 -0400
+@@ -31,6 +31,7 @@
+ import java.io.ObjectInputStream;
+ import java.io.IOException;
+ import javax.accessibility.*;
++import sun.awt.AWTAccessor;
+
+
+ /**
+@@ -68,6 +69,13 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++
++ AWTAccessor.setCheckboxMenuItemAccessor(
++ new AWTAccessor.CheckboxMenuItemAccessor() {
++ public boolean getState(CheckboxMenuItem cmi) {
++ return cmi.state;
++ }
++ });
+ }
+
+ /**
+--- jdk/src/share/classes/java/awt/Component.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/Component.java 2012-09-05 19:35:40.000000000 -0400
+@@ -798,10 +798,25 @@
+
+ static {
+ AWTAccessor.setComponentAccessor(new AWTAccessor.ComponentAccessor() {
++ public AppContext getAppContext(Component comp) {
++ return comp.appContext;
++ }
++
++ public void setAppContext(Component comp, AppContext appContext) {
++ comp.appContext = appContext;
++ }
++
+ public AccessControlContext getAccessControlContext(Component comp) {
+ return comp.getAccessControlContext();
+ }
+
++ public boolean requestFocusInWindow(Component comp, CausedFocusEvent.Cause cause) {
++ return comp.requestFocusInWindow(cause);
++ }
++
++ public void requestFocus(Component comp, CausedFocusEvent.Cause cause) {
++ comp.requestFocus(cause);
++ }
+ });
+ }
+
+--- jdk/src/share/classes/java/awt/Cursor.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/Cursor.java 2012-09-05 19:35:40.000000000 -0400
+@@ -38,6 +38,7 @@
+ import java.util.logging.*;
+
+ import java.security.AccessController;
++import sun.awt.AWTAccessor;
+
+ /**
+ * A class to encapsulate the bitmap representation of the mouse cursor.
+@@ -193,6 +194,21 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++
++ AWTAccessor.setCursorAccessor(
++ new AWTAccessor.CursorAccessor() {
++ public long getPData(Cursor cursor) {
++ return cursor.pData;
++ }
++
++ public void setPData(Cursor cursor, long pData) {
++ cursor.pData = pData;
++ }
++
++ public int getType(Cursor cursor) {
++ return cursor.type;
++ }
++ });
+ }
+
+ /**
+--- jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java 2012-09-05 19:35:40.000000000 -0400
+@@ -40,6 +40,7 @@
+
+ import sun.awt.AppContext;
+ import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+ import sun.awt.CausedFocusEvent;
+
+ /**
+@@ -76,6 +77,16 @@
+ typeAheadMarkers = new LinkedList();
+ private boolean consumeNextKeyTyped;
+
++ static {
++ AWTAccessor.setDefaultKeyboardFocusManagerAccessor(
++ new AWTAccessor.DefaultKeyboardFocusManagerAccessor() {
++ public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm,
++ KeyEvent e) {
++ dkfm.consumeNextKeyTyped(e);
++ }
++ });
++ }
++
+ private static class TypeAheadMarker {
+ long after;
+ Component untilFocused;
+--- jdk/src/share/classes/java/awt/EventQueue.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/EventQueue.java 2012-09-05 19:35:40.000000000 -0400
+@@ -42,9 +42,9 @@
+ import sun.awt.AWTAutoShutdown;
+ import sun.awt.PeerEvent;
+ import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ import java.security.AccessControlContext;
+-import java.security.ProtectionDomain;
+
+ import sun.misc.SharedSecrets;
+ import sun.misc.JavaSecurityAccess;
+@@ -159,6 +159,26 @@
+
+ private static final Logger eventLog = Logger.getLogger("java.awt.event.EventQueue");
+
++ static {
++ AWTAccessor.setEventQueueAccessor(
++ new AWTAccessor.EventQueueAccessor() {
++ public boolean noEvents(EventQueue eventQueue) {
++ return eventQueue.noEvents();
++ }
++ public Thread getDispatchThread(EventQueue eventQueue) {
++ return eventQueue.dispatchThread;
++ }
++ public EventQueue getNextQueue(EventQueue eventQueue) {
++ return eventQueue.nextQueue;
++ }
++ public void removeSourceEvents(EventQueue eventQueue,
++ Object source,
++ boolean removeAllEvents) {
++ eventQueue.removeSourceEvents(source, removeAllEvents);
++ }
++ });
++ }
++
+ public EventQueue() {
+ for (int i = 0; i < NUM_PRIORITIES; i++) {
+ queues[i] = new Queue();
+--- jdk/src/share/classes/java/awt/Font.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/Font.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -878,8 +2287,322 @@
}
}
);
---- jdk/src/share/classes/java/io/File.java.orig 2012-05-01 17:18:09.000000000 -0400
-+++ jdk/src/share/classes/java/io/File.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/java/awt/KeyboardFocusManager.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/KeyboardFocusManager.java 2012-09-05 19:35:40.000000000 -0400
+@@ -60,6 +60,7 @@
+ import sun.awt.HeadlessToolkit;
+ import sun.awt.SunToolkit;
+ import sun.awt.CausedFocusEvent;
++import sun.awt.AWTAccessor;
+
+ /**
+ * The KeyboardFocusManager is responsible for managing the active and focused
+@@ -117,6 +118,24 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++ AWTAccessor.setKeyboardFocusManagerAccessor(
++ new AWTAccessor.KeyboardFocusManagerAccessor() {
++ public int shouldNativelyFocusHeavyweight(Component heavyweight,
++ Component descendant,
++ boolean temporary,
++ boolean focusedWindowChangeAllowed,
++ long time,
++ CausedFocusEvent.Cause cause)
++ {
++ return KeyboardFocusManager.shouldNativelyFocusHeavyweight(
++ heavyweight, descendant, temporary, focusedWindowChangeAllowed, time, cause);
++ }
++
++ public void removeLastFocusRequest(Component heavyweight) {
++ KeyboardFocusManager.removeLastFocusRequest(heavyweight);
++ }
++ }
++ );
+ }
+
+ transient KeyboardFocusManagerPeer peer;
+--- jdk/src/share/classes/java/awt/Menu.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/Menu.java 2012-09-05 19:35:40.000000000 -0400
+@@ -31,6 +31,7 @@
+ import java.awt.peer.MenuPeer;
+ import java.awt.event.KeyEvent;
+ import javax.accessibility.*;
++import sun.awt.AWTAccessor;
+
+ /**
+ * A <code>Menu</code> object is a pull-down menu component
+@@ -62,6 +63,12 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++ AWTAccessor.setMenuAccessor(
++ new AWTAccessor.MenuAccessor() {
++ public Vector getItems(Menu menu) {
++ return menu.items;
++ }
++ });
+ }
+
+ /**
+--- jdk/src/share/classes/java/awt/MenuBar.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/MenuBar.java 2012-09-05 19:35:40.000000000 -0400
+@@ -28,6 +28,7 @@
+ import java.io.ObjectInputStream;
+ import java.util.Vector;
+ import java.util.Enumeration;
++import sun.awt.AWTAccessor;
+ import java.awt.peer.MenuBarPeer;
+ import java.awt.event.KeyEvent;
+ import javax.accessibility.*;
+@@ -74,6 +75,16 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++ AWTAccessor.setMenuBarAccessor(
++ new AWTAccessor.MenuBarAccessor() {
++ public Menu getHelpMenu(MenuBar menuBar) {
++ return menuBar.helpMenu;
++ }
++
++ public Vector getMenus(MenuBar menuBar) {
++ return menuBar.menus;
++ }
++ });
+ }
+
+ /**
+--- jdk/src/share/classes/java/awt/MenuComponent.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/MenuComponent.java 2012-09-05 19:35:40.000000000 -0400
+@@ -29,7 +29,7 @@
+ import java.io.IOException;
+ import java.io.ObjectInputStream;
+ import sun.awt.AppContext;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+ import javax.accessibility.*;
+
+ import java.security.AccessControlContext;
+@@ -55,6 +55,22 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++ AWTAccessor.setMenuComponentAccessor(
++ new AWTAccessor.MenuComponentAccessor() {
++ public AppContext getAppContext(MenuComponent menuComp) {
++ return menuComp.appContext;
++ }
++ public void setAppContext(MenuComponent menuComp,
++ AppContext appContext) {
++ menuComp.appContext = appContext;
++ }
++ public MenuContainer getParent(MenuComponent menuComp) {
++ return menuComp.parent;
++ }
++ public Font getFont_NoClientCode(MenuComponent menuComp) {
++ return menuComp.getFont_NoClientCode();
++ }
++ });
+ }
+
+ transient MenuComponentPeer peer;
+--- jdk/src/share/classes/java/awt/MenuItem.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/MenuItem.java 2012-09-05 19:35:40.000000000 -0400
+@@ -31,7 +31,7 @@
+ import java.io.ObjectInputStream;
+ import java.io.IOException;
+ import javax.accessibility.*;
+-
++import sun.awt.AWTAccessor;
+
+ /**
+ * All items in a menu must belong to the class
+@@ -76,6 +76,29 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++
++ AWTAccessor.setMenuItemAccessor(
++ new AWTAccessor.MenuItemAccessor() {
++ public boolean isEnabled(MenuItem item) {
++ return item.enabled;
++ }
++
++ public String getLabel(MenuItem item) {
++ return item.label;
++ }
++
++ public MenuShortcut getShortcut(MenuItem item) {
++ return item.shortcut;
++ }
++
++ public String getActionCommandImpl(MenuItem item) {
++ return item.getActionCommandImpl();
++ }
++
++ public boolean isItemEnabled(MenuItem item) {
++ return item.isItemEnabled();
++ }
++ });
+ }
+
+ /**
+--- jdk/src/share/classes/java/awt/PopupMenu.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/PopupMenu.java 2012-09-05 19:35:40.000000000 -0400
+@@ -28,6 +28,7 @@
+ import java.awt.peer.PopupMenuPeer;
+ import javax.accessibility.*;
+
++import sun.awt.AWTAccessor;
+
+ /**
+ * A class that implements a menu which can be dynamically popped up
+@@ -48,6 +49,15 @@
+
+ transient boolean isTrayIconPopup = false;
+
++ static {
++ AWTAccessor.setPopupMenuAccessor(
++ new AWTAccessor.PopupMenuAccessor() {
++ public boolean isTrayIconPopup(PopupMenu popupMenu) {
++ return popupMenu.isTrayIconPopup;
++ }
++ });
++ }
++
+ /*
+ * JDK 1.1 serialVersionUID
+ */
+--- jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java 2012-09-05 19:35:40.000000000 -0400
+@@ -24,6 +24,8 @@
+ */
+ package java.awt;
+
++import sun.awt.AWTAccessor;
++
+ import java.awt.event.AdjustmentEvent;
+ import java.awt.event.AdjustmentListener;
+ import java.awt.peer.ScrollPanePeer;
+@@ -156,6 +158,12 @@
+ if (!GraphicsEnvironment.isHeadless()) {
+ initIDs();
+ }
++ AWTAccessor.setScrollPaneAdjustableAccessor(new AWTAccessor.ScrollPaneAdjustableAccessor() {
++ public void setTypedValue(final ScrollPaneAdjustable adj,
++ final int v, final int type) {
++ adj.setTypedValue(v, type);
++ }
++ });
+ }
+
+ /**
+--- jdk/src/share/classes/java/awt/Window.java 2012-05-01 17:18:08.000000000 -0400
++++ jdk/src/share/classes/java/awt/Window.java 2012-09-05 19:35:40.000000000 -0400
+@@ -50,6 +50,7 @@
+ import java.util.logging.Logger;
+ import java.util.concurrent.atomic.AtomicBoolean;
+ import javax.accessibility.*;
++import sun.awt.AWTAccessor;
+ import sun.awt.AppContext;
+ import sun.awt.CausedFocusEvent;
+ import sun.awt.SunToolkit;
+@@ -318,6 +319,12 @@
+ s = (String) java.security.AccessController.doPrivileged(
+ new GetPropertyAction("java.awt.Window.locationByPlatform"));
+ locationByPlatformProp = (s != null && s.equals("true"));
++
++ AWTAccessor.setWindowAccessor(new AWTAccessor.WindowAccessor() {
++ public void setLWRequestStatus(Window changed, boolean status) {
++ changed.syncLWRequests = status;
++ }
++ });
+ }
+
+ /**
+--- jdk/src/share/classes/java/beans/Introspector.java 2012-05-01 17:18:09.000000000 -0400
++++ jdk/src/share/classes/java/beans/Introspector.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -139,6 +139,7 @@
+ private Map events;
+
+ private final static String DEFAULT_INFO_PATH = "sun.beans.infos";
++ private final static String DEFAULT_INFO_PATH_NEW = "com.sun.beans.infos";
+
+ private static String[] searchPath = { DEFAULT_INFO_PATH };
+
+@@ -460,12 +461,15 @@
+ name = name.substring(name.lastIndexOf('.')+1);
+
+ for (int i = 0; i < searchPath.length; i++) {
++ String path = searchPath[i];
++ if (DEFAULT_INFO_PATH.equals(path)) {
++ path = DEFAULT_INFO_PATH_NEW;
++ }
+ // This optimization will only use the BeanInfo search path if is has changed
+ // from the original or trying to get the ComponentBeanInfo.
+- if (!DEFAULT_INFO_PATH.equals(searchPath[i]) ||
+- DEFAULT_INFO_PATH.equals(searchPath[i]) && "ComponentBeanInfo".equals(name)) {
++ if (!DEFAULT_INFO_PATH_NEW.equals(path) || "ComponentBeanInfo".equals(name)) {
+ try {
+- String fullName = searchPath[i] + "." + name;
++ String fullName = path + "." + name;
+ java.beans.BeanInfo bi = (java.beans.BeanInfo)instantiate(beanClass, fullName);
+
+ // Make sure that the returned BeanInfo matches the class.
+--- jdk/src/share/classes/java/beans/PropertyEditorManager.java 2012-05-01 17:18:09.000000000 -0400
++++ jdk/src/share/classes/java/beans/PropertyEditorManager.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -25,7 +25,7 @@
+
+ package java.beans;
+
+-import sun.beans.editors.*;
++import com.sun.beans.editors.*;
+
+ /**
+ * The PropertyEditorManager can be used to locate a property editor for
+@@ -54,6 +54,9 @@
+
+ public class PropertyEditorManager {
+
++ private static final String DEFAULT_SEARCH_PATH = "sun.beans.editors";
++ private static final String DEFAULT_SEARCH_PATH_NEW = "com.sun.beans.editors";
++
+ /**
+ * Register an editor class to be used to edit values of
+ * a given target class.
+@@ -119,7 +122,7 @@
+ editorName = editorName.substring(index);
+ }
+ for (String path : searchPath) {
+- String name = path + '.' + editorName;
++ String name = (DEFAULT_SEARCH_PATH.equals(path) ? DEFAULT_SEARCH_PATH_NEW : path) + '.' + editorName;
+ try {
+ return (PropertyEditor) Introspector.instantiate(targetType, name);
+ } catch (Exception ex) {
+@@ -188,6 +191,6 @@
+ registry.put(Double.TYPE, DoubleEditor.class);
+ }
+
+- private static String[] searchPath = { "sun.beans.editors" };
++ private static String[] searchPath = { DEFAULT_SEARCH_PATH };
+ private static java.util.Hashtable registry;
+ }
+--- jdk/src/share/classes/java/io/File.java 2012-05-01 17:18:09.000000000 -0400
++++ jdk/src/share/classes/java/io/File.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -986,8 +2709,8 @@
+ });
+ }
}
---- jdk/src/share/classes/java/io/FileSystem.java.orig 2012-05-01 17:18:09.000000000 -0400
-+++ jdk/src/share/classes/java/io/FileSystem.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/java/io/FileSystem.java 2012-05-01 17:18:09.000000000 -0400
++++ jdk/src/share/classes/java/io/FileSystem.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
@@ -1010,8 +2733,8 @@
throws IOException;
/**
---- jdk/src/share/classes/javax/imageio/stream/FileCacheImageInputStream.java.orig 2012-05-01 17:18:13.000000000 -0400
-+++ jdk/src/share/classes/javax/imageio/stream/FileCacheImageInputStream.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/javax/imageio/stream/FileCacheImageInputStream.java 2012-05-01 17:18:13.000000000 -0400
++++ jdk/src/share/classes/javax/imageio/stream/FileCacheImageInputStream.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -1028,8 +2751,8 @@
this.cache = new RandomAccessFile(cacheFile, "rw");
this.closeAction = StreamCloser.createCloseAction(this);
---- jdk/src/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java.orig 2012-05-01 17:18:13.000000000 -0400
-+++ jdk/src/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java 2012-05-01 17:18:13.000000000 -0400
++++ jdk/src/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -1046,8 +2769,8 @@
this.cache = new RandomAccessFile(cacheFile, "rw");
this.closeAction = StreamCloser.createCloseAction(this);
---- jdk/src/share/classes/javax/management/loading/MLet.java.orig 2012-05-01 17:18:13.000000000 -0400
-+++ jdk/src/share/classes/javax/management/loading/MLet.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/javax/management/loading/MLet.java 2012-05-01 17:18:13.000000000 -0400
++++ jdk/src/share/classes/javax/management/loading/MLet.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -1064,8 +2787,35 @@
file.deleteOnExit();
FileOutputStream fileOutput = new FileOutputStream(file);
int c;
---- jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java.orig 2012-05-01 17:18:17.000000000 -0400
-+++ jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java 2012-06-13 12:53:13.000000000 -0400
+--- jdk/src/share/classes/javax/swing/ClientPropertyKey.java 2012-05-01 17:18:15.000000000 -0400
++++ jdk/src/share/classes/javax/swing/ClientPropertyKey.java 2012-09-05 19:35:40.000000000 -0400
+@@ -25,6 +25,8 @@
+
+ package javax.swing;
+
++import sun.awt.AWTAccessor;
++
+ /**
+ * An enumeration for keys used as client properties within the Swing
+ * implementation.
+@@ -86,6 +88,15 @@
+ */
+ private final boolean reportValueNotSerializable;
+
++ static {
++ AWTAccessor.setClientPropertyKeyAccessor(
++ new AWTAccessor.ClientPropertyKeyAccessor() {
++ public Object getJComponent_TRANSFER_HANDLER() {
++ return JComponent_TRANSFER_HANDLER;
++ }
++ });
++ }
++
+ /**
+ * Constructs a key with the {@code reportValueNotSerializable} property
+ * set to {@code false}.
+--- jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java 2012-05-01 17:18:17.000000000 -0400
++++ jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java 2012-09-05 19:34:26.000000000 -0400
@@ -135,8 +135,8 @@
if (!c.isEnabled()) {
state = DISABLED;
@@ -1077,8 +2827,8 @@
}
AbstractButton button = (AbstractButton) c;
ButtonModel model = button.getModel();
---- jdk/src/share/classes/javax/swing/plaf/synth/SynthLabelUI.java.orig 2012-05-01 17:18:17.000000000 -0400
-+++ jdk/src/share/classes/javax/swing/plaf/synth/SynthLabelUI.java 2012-06-13 12:53:13.000000000 -0400
+--- jdk/src/share/classes/javax/swing/plaf/synth/SynthLabelUI.java 2012-05-01 17:18:17.000000000 -0400
++++ jdk/src/share/classes/javax/swing/plaf/synth/SynthLabelUI.java 2012-09-05 19:34:26.000000000 -0400
@@ -94,9 +94,9 @@
private int getComponentState(JComponent c) {
@@ -1091,8 +2841,8 @@
}
return state;
}
---- jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java.orig 2012-05-01 17:18:17.000000000 -0400
-+++ jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 2012-06-13 12:53:13.000000000 -0400
+--- jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 2012-05-01 17:18:17.000000000 -0400
++++ jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 2012-09-05 19:34:26.000000000 -0400
@@ -78,27 +78,25 @@
private static final Object STYLE_FACTORY_KEY = new Object(); // com.sun.java.swing.plaf.gtk.StyleCache
@@ -1218,8 +2968,2046 @@
return lastFactory;
}
}
---- jdk/src/share/classes/sun/misc/IOUtils.java.orig 2012-05-01 17:18:21.000000000 -0400
-+++ jdk/src/share/classes/sun/misc/IOUtils.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-05-01 17:18:18.000000000 -0400
++++ jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-09-05 19:35:40.000000000 -0400
+@@ -26,16 +26,15 @@
+ package sun.awt;
+
+ import java.awt.*;
+-import java.awt.event.InputEvent;
+-import java.awt.geom.Point2D;
+-import java.awt.image.BufferedImage;
+
+ import sun.misc.Unsafe;
+-import java.awt.peer.ComponentPeer;
+
+-import java.security.AccessController;
+ import java.security.AccessControlContext;
+
++import java.util.Vector;
++
++import java.awt.event.KeyEvent;
++
+ /**
+ * The AWTAccessor utility class.
+ * The main purpose of this class is to enable accessing
+@@ -55,14 +54,64 @@
+ private AWTAccessor() {
+ }
+
++ /**
++ * An interface of an accessor for java.awt.Window class.
++ */
++ public interface WindowAccessor {
++ /**
++ * Sets the synchronous status of focus requests on lightweight
++ * components in the specified window to the specified value.
++ */
++ void setLWRequestStatus(Window changed, boolean status);
++ }
++
+ /*
+ * An interface of accessor for the java.awt.Component class.
+ */
+ public interface ComponentAccessor {
++ /**
++ * Returns the appContext of the component.
++ */
++ AppContext getAppContext(Component comp);
++
++ /**
++ * Sets the appContext of the component.
++ */
++ void setAppContext(Component comp, AppContext appContext);
++
+ /*
+ * Returns the acc this component was constructed with.
+ */
+ AccessControlContext getAccessControlContext(Component comp);
++
++ /**
++ * Requests that this Component get the input focus, if this
++ * Component's top-level ancestor is already the focused Window
++ */
++ boolean requestFocusInWindow(Component comp, CausedFocusEvent.Cause cause);
++
++ /**
++ * Requests that this Component get the input focus, providing the cause
++ */
++ void requestFocus(Component comp, CausedFocusEvent.Cause cause);
++ }
++
++ /**
++ * An interface of accessor for the KeyboardFocusManager class.
++ */
++ public interface KeyboardFocusManagerAccessor {
++ /**
++ * Indicates whether the native implementation should
++ * proceed with a pending focus request for the heavyweight.
++ */
++ int shouldNativelyFocusHeavyweight(Component heavyweight,
++ Component descendant,
++ boolean temporary,
++ boolean focusedWindowChangeAllowed,
++ long time,
++ CausedFocusEvent.Cause cause);
++
++ void removeLastFocusRequest(Component heavyweight);
+ }
+
+ /*
+@@ -70,6 +119,11 @@
+ */
+ public interface AWTEventAccessor {
+ /**
++ * Marks the event as posted.
++ */
++ void setPosted(AWTEvent ev);
++
++ /**
+ * Sets the flag on this AWTEvent indicating that it was
+ * generated by the system.
+ */
+@@ -80,20 +134,234 @@
+ */
+ boolean isSystemGenerated(AWTEvent ev);
+
+-
+ /*
+ * Returns the acc this event was constructed with.
+ */
+ AccessControlContext getAccessControlContext(AWTEvent ev);
+
++ /**
++ * Returns binary data associated with this event;
++ */
++ byte[] getBData(AWTEvent ev);
++
++ /**
++ * Associates binary data with this event;
++ */
++ void setBData(AWTEvent ev, byte[] bdata);
++}
++
++ /**
++ * An accessor for the MenuComponent class.
++ */
++ public interface MenuComponentAccessor {
++ /**
++ * Returns the appContext of the menu component.
++ */
++ AppContext getAppContext(MenuComponent menuComp);
++
++ /**
++ * Sets the appContext of the menu component.
++ */
++ void setAppContext(MenuComponent menuComp, AppContext appContext);
++
++ /**
++ * Returns the parent container for this menu component.
++ */
++ MenuContainer getParent(MenuComponent menuComp);
++
++ /**
++ * Gets the font used for this menu component.
++ */
++ Font getFont_NoClientCode(MenuComponent menuComp);
++ }
++
++ /** An accessor for the EventQueue class
++ */
++ public interface EventQueueAccessor {
++ /**
++ * Returns whether an event is pending on any of the separate Queues.
++ */
++ boolean noEvents(EventQueue eventQueue);
++
++ /**
++ * Returns dispatch thread for the given EventQueue which has private access
++ */
++ Thread getDispatchThread(EventQueue eventQueue);
++
++ /**
++ * Returns next queue for the given EventQueue which has private access
++ */
++ EventQueue getNextQueue(EventQueue eventQueue);
++
++ /**
++ * Removes any pending events for the specified source object.
++ */
++ void removeSourceEvents(EventQueue eventQueue, Object source,
++ boolean removeAllEvents);
++ }
++
++ /**
++ * An accessor for the PopupMenu class
++ */
++ public interface PopupMenuAccessor {
++ /**
++ * Returns whether the popup menu is attached to a tray
++ */
++ boolean isTrayIconPopup(PopupMenu popupMenu);
++ }
++
++ /**
++ * An accessor for the ScrollPaneAdjustable class.
++ */
++ public interface ScrollPaneAdjustableAccessor {
++ /**
++ * Sets the value of this scrollbar to the specified value.
++ */
++ void setTypedValue(final ScrollPaneAdjustable adj, final int v,
++ final int type);
++ }
++
++ /**
++ * An accessor for the CheckboxMenuItem class
++ */
++ public interface CheckboxMenuItemAccessor {
++ /**
++ * Returns whether menu item is checked
++ */
++ boolean getState(CheckboxMenuItem cmi);
++ }
++
++ /**
++ * An accessor for the Cursor class
++ */
++ public interface CursorAccessor {
++ /**
++ * Returns pData of the Cursor class
++ */
++ long getPData(Cursor cursor);
++
++ /**
++ * Sets pData to the Cursor class
++ */
++ void setPData(Cursor cursor, long pData);
++
++ /**
++ * Return type of the Cursor class
++ */
++ int getType(Cursor cursor);
++ }
++
++ /**
++ * An accessor for the MenuBar class
++ */
++ public interface MenuBarAccessor {
++ /**
++ * Returns help menu
++ */
++ Menu getHelpMenu(MenuBar menuBar);
++
++ /**
++ * Returns menus
++ */
++ Vector getMenus(MenuBar menuBar);
++ }
++
++ /**
++ * An accessor for the MenuItem class
++ */
++ public interface MenuItemAccessor {
++ /**
++ * Returns whether menu item is enabled
++ */
++ boolean isEnabled(MenuItem item);
++
++ /**
++ * Gets the command name of the action event that is fired
++ * by this menu item.
++ */
++ String getActionCommandImpl(MenuItem item);
++
++ /**
++ * Returns true if the item and all its ancestors are
++ * enabled, false otherwise
++ */
++ boolean isItemEnabled(MenuItem item);
++
++ /**
++ * Returns label
++ */
++ String getLabel(MenuItem item);
++
++ /**
++ * Returns shortcut
++ */
++ MenuShortcut getShortcut(MenuItem item);
++ }
++
++ /**
++ * An accessor for the Menu class
++ */
++ public interface MenuAccessor {
++ /**
++ * Returns vector of the items that are part of the Menu
++ */
++ Vector getItems(Menu menu);
++ }
++
++ /**
++ * An accessor for the ClientPropertyKey class
++ */
++ public interface ClientPropertyKeyAccessor {
++ /**
++ * Retrieves JComponent_TRANSFER_HANDLER enum object
++ */
++ Object getJComponent_TRANSFER_HANDLER();
++ }
++
++ /**
++ * An accessor for the DefaultKeyboardFocusManager class
++ */
++ public interface DefaultKeyboardFocusManagerAccessor {
++ void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e);
+ }
+
+ /*
+ * Accessor instances are initialized in the static initializers of
+ * corresponding AWT classes by using setters defined below.
+ */
++ private static WindowAccessor windowAccessor;
+ private static ComponentAccessor componentAccessor;
++ private static KeyboardFocusManagerAccessor kfmAccessor;
+ private static AWTEventAccessor awtEventAccessor;
++ private static MenuComponentAccessor menuComponentAccessor;
++ private static EventQueueAccessor eventQueueAccessor;
++ private static PopupMenuAccessor popupMenuAccessor;
++ private static ScrollPaneAdjustableAccessor scrollPaneAdjustableAccessor;
++ private static CheckboxMenuItemAccessor checkboxMenuItemAccessor;
++ private static CursorAccessor cursorAccessor;
++ private static MenuBarAccessor menuBarAccessor;
++ private static MenuItemAccessor menuItemAccessor;
++ private static MenuAccessor menuAccessor;
++ private static ClientPropertyKeyAccessor clientPropertyKeyAccessor;
++ private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
++
++ /**
++ * Set an accessor object for the java.awt.Window class.
++ */
++ public static void setWindowAccessor(WindowAccessor wa) {
++ windowAccessor = wa;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.Window class.
++ */
++ public static WindowAccessor getWindowAccessor() {
++ if (windowAccessor == null) {
++ unsafe.ensureClassInitialized(Window.class);
++ }
++
++ return windowAccessor;
++ }
+
+ /*
+ * Set an accessor object for the java.awt.Component class.
+@@ -113,6 +381,23 @@
+ return componentAccessor;
+ }
+
++ /**
++ * Set an accessor object for the java.awt.KeyboardFocusManager class.
++ */
++ public static void setKeyboardFocusManagerAccessor(KeyboardFocusManagerAccessor kfma) {
++ kfmAccessor = kfma;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.KeyboardFocusManager class.
++ */
++ public static KeyboardFocusManagerAccessor getKeyboardFocusManagerAccessor() {
++ if (kfmAccessor == null) {
++ unsafe.ensureClassInitialized(KeyboardFocusManager.class);
++ }
++ return kfmAccessor;
++ }
++
+ /*
+ * Set an accessor object for the java.awt.AWTEvent class.
+ */
+@@ -129,4 +414,194 @@
+ }
+ return awtEventAccessor;
+ }
++
++ /**
++ * Set an accessor object for the java.awt.MenuComponent class.
++ */
++ public static void setMenuComponentAccessor(MenuComponentAccessor mca) {
++ menuComponentAccessor = mca;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.MenuComponent class.
++ */
++ public static MenuComponentAccessor getMenuComponentAccessor() {
++ if (menuComponentAccessor == null) {
++ unsafe.ensureClassInitialized(MenuComponent.class);
++ }
++
++ return menuComponentAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.EventQueue class.
++ */
++ public static void setEventQueueAccessor(EventQueueAccessor eqa) {
++ eventQueueAccessor = eqa;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.EventQueue class.
++ */
++ public static EventQueueAccessor getEventQueueAccessor() {
++ if (eventQueueAccessor == null) {
++ unsafe.ensureClassInitialized(EventQueue.class);
++ }
++ return eventQueueAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.PopupMenu class.
++ */
++ public static void setPopupMenuAccessor(PopupMenuAccessor pma) {
++ popupMenuAccessor = pma;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.PopupMenu class.
++ */
++ public static PopupMenuAccessor getPopupMenuAccessor() {
++ if (popupMenuAccessor == null) {
++ unsafe.ensureClassInitialized(PopupMenu.class);
++ }
++ return popupMenuAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.ScrollPaneAdjustable class.
++ */
++ public static void setScrollPaneAdjustableAccessor(ScrollPaneAdjustableAccessor adj) {
++ scrollPaneAdjustableAccessor = adj;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.ScrollPaneAdjustable
++ * class.
++ */
++ public static ScrollPaneAdjustableAccessor getScrollPaneAdjustableAccessor() {
++ if (scrollPaneAdjustableAccessor == null) {
++ unsafe.ensureClassInitialized(ScrollPaneAdjustable.class);
++ }
++ return scrollPaneAdjustableAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.CheckboxMenuItem class.
++ */
++ public static void setCheckboxMenuItemAccessor(CheckboxMenuItemAccessor cmia) {
++ checkboxMenuItemAccessor = cmia;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.CheckboxMenuItem class.
++ */
++ public static CheckboxMenuItemAccessor getCheckboxMenuItemAccessor() {
++ if (checkboxMenuItemAccessor == null) {
++ unsafe.ensureClassInitialized(CheckboxMenuItemAccessor.class);
++ }
++ return checkboxMenuItemAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.Cursor class.
++ */
++ public static void setCursorAccessor(CursorAccessor ca) {
++ cursorAccessor = ca;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.Cursor class.
++ */
++ public static CursorAccessor getCursorAccessor() {
++ if (cursorAccessor == null) {
++ unsafe.ensureClassInitialized(CursorAccessor.class);
++ }
++ return cursorAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.MenuBar class.
++ */
++ public static void setMenuBarAccessor(MenuBarAccessor mba) {
++ menuBarAccessor = mba;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.MenuBar class.
++ */
++ public static MenuBarAccessor getMenuBarAccessor() {
++ if (menuBarAccessor == null) {
++ unsafe.ensureClassInitialized(MenuBarAccessor.class);
++ }
++ return menuBarAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.MenuItem class.
++ */
++ public static void setMenuItemAccessor(MenuItemAccessor mia) {
++ menuItemAccessor = mia;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.MenuItem class.
++ */
++ public static MenuItemAccessor getMenuItemAccessor() {
++ if (menuItemAccessor == null) {
++ unsafe.ensureClassInitialized(MenuItemAccessor.class);
++ }
++ return menuItemAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.Menu class.
++ */
++ public static void setMenuAccessor(MenuAccessor ma) {
++ menuAccessor = ma;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.Menu class.
++ */
++ public static MenuAccessor getMenuAccessor() {
++ if (menuAccessor == null) {
++ unsafe.ensureClassInitialized(MenuAccessor.class);
++ }
++ return menuAccessor;
++ }
++
++ /**
++ * Set an accessor object for the javax.swing.ClientPropertyKey class.
++ */
++ public static void setClientPropertyKeyAccessor(ClientPropertyKeyAccessor cpka) {
++ clientPropertyKeyAccessor = cpka;
++ }
++
++ /**
++ * Retrieve the accessor object for the javax.swing.ClientPropertyKey class.
++ */
++ public static ClientPropertyKeyAccessor getClientPropertyKeyAccessor() {
++ if (clientPropertyKeyAccessor == null) {
++ unsafe.ensureClassInitialized(ClientPropertyKeyAccessor.class);
++ }
++ return clientPropertyKeyAccessor;
++ }
++
++ /**
++ * Set an accessor object for the java.awt.DefaultKeyboardFocusManager class.
++ */
++ public static void setDefaultKeyboardFocusManagerAccessor(
++ DefaultKeyboardFocusManagerAccessor dkfma) {
++ defaultKeyboardFocusManagerAccessor = dkfma;
++ }
++
++ /**
++ * Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class.
++ */
++ public static DefaultKeyboardFocusManagerAccessor getDefaultKeyboardFocusManagerAccessor() {
++ if (defaultKeyboardFocusManagerAccessor == null) {
++ unsafe.ensureClassInitialized(DefaultKeyboardFocusManagerAccessor.class);
++ }
++ return defaultKeyboardFocusManagerAccessor;
++ }
+ }
+--- jdk/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java 2012-05-01 17:18:18.000000000 -0400
++++ jdk/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java 2012-09-05 19:35:40.000000000 -0400
+@@ -30,10 +30,6 @@
+
+ import java.awt.peer.KeyboardFocusManagerPeer;
+
+-import java.lang.reflect.InvocationTargetException;
+-import java.lang.reflect.Method;
+-
+-
+ public class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer {
+ static native Window getNativeFocusedWindow();
+ static native Component getNativeFocusOwner();
+@@ -56,18 +52,7 @@
+ clearNativeGlobalFocusOwner(activeWindow);
+ }
+
+- static Method m_removeLastFocusRequest = null;
+ public static void removeLastFocusRequest(Component heavyweight) {
+- try {
+- if (m_removeLastFocusRequest == null) {
+- m_removeLastFocusRequest = SunToolkit.getMethod(KeyboardFocusManager.class, "removeLastFocusRequest",
+- new Class[] {Component.class});
+- }
+- m_removeLastFocusRequest.invoke(null, new Object[]{heavyweight});
+- } catch (InvocationTargetException ite) {
+- ite.printStackTrace();
+- } catch (IllegalAccessException ex) {
+- ex.printStackTrace();
+- }
++ AWTAccessor.getKeyboardFocusManagerAccessor().removeLastFocusRequest(heavyweight);
+ }
+ }
+--- jdk/src/share/classes/sun/awt/SunToolkit.java 2012-05-01 17:18:18.000000000 -0400
++++ jdk/src/share/classes/sun/awt/SunToolkit.java 2012-09-05 19:35:40.000000000 -0400
+@@ -32,14 +32,10 @@
+ import java.awt.peer.*;
+ import java.awt.event.WindowEvent;
+ import java.awt.event.KeyEvent;
+-import java.awt.im.spi.InputMethodDescriptor;
+ import java.awt.image.*;
+-import java.awt.geom.AffineTransform;
+ import java.awt.TrayIcon;
+ import java.awt.SystemTray;
+-import java.io.*;
+ import java.net.URL;
+-import java.net.JarURLConnection;
+ import java.util.*;
+ import java.util.concurrent.TimeUnit;
+ import java.util.concurrent.locks.Condition;
+@@ -49,18 +45,14 @@
+ import sun.misc.SoftCache;
+ import sun.font.FontDesignMetrics;
+ import sun.awt.im.InputContext;
+-import sun.awt.im.SimpleInputMethodWindow;
+ import sun.awt.image.*;
+ import sun.security.action.GetPropertyAction;
+ import sun.security.action.GetBooleanAction;
+-import java.lang.reflect.Field;
+ import java.lang.reflect.Method;
+ import java.lang.reflect.Constructor;
+ import java.lang.reflect.InvocationTargetException;
+ import java.security.AccessController;
+ import java.security.PrivilegedAction;
+-import java.security.PrivilegedActionException;
+-import java.security.PrivilegedExceptionAction;
+
+ public abstract class SunToolkit extends Toolkit
+ implements WindowClosingSupport, WindowClosingListener,
+@@ -82,14 +74,7 @@
+ */
+ public static final int GRAB_EVENT_MASK = 0x80000000;
+
+- private static Field syncLWRequestsField;
+ private static Method wakeupMethod;
+- private static Field componentKeyField;
+- private static Field menuComponentKeyField;
+- private static Field trayIconKeyField;
+- private static Field componentAppContextField;
+- private static Field menuComponentAppContextField;
+- private static Field isPostedField;
+ /* The key to put()/get() the PostEventQueue into/from the AppContext.
+ */
+ private static final String POST_EVENT_QUEUE_KEY = "PostEventQueue";
+@@ -326,24 +311,6 @@
+ return appContext;
+ }
+
+- public static Field getField(final Class klass, final String fieldName) {
+- return AccessController.doPrivileged(new PrivilegedAction<Field>() {
+- public Field run() {
+- try {
+- Field field = klass.getDeclaredField(fieldName);
+- assert (field != null);
+- field.setAccessible(true);
+- return field;
+- } catch (SecurityException e) {
+- assert false;
+- } catch (NoSuchFieldException e) {
+- assert false;
+- }
+- return null;
+- }//run
+- });
+- }
+-
+ static void wakeupEventQueue(EventQueue q, boolean isShutdown){
+ if (wakeupMethod == null){
+ wakeupMethod = (Method)AccessController.doPrivileged(new PrivilegedAction(){
+@@ -417,25 +384,15 @@
+ */
+ private static boolean setAppContext(Object target, AppContext context)
+ {
+- if (!(target instanceof Component) && !(target instanceof MenuComponent)) {
++ if (target instanceof Component) {
++ AWTAccessor.getComponentAccessor().
++ setAppContext((Component)target, context);
++ } else if (target instanceof MenuComponent) {
++ AWTAccessor.getMenuComponentAccessor().
++ setAppContext((MenuComponent)target, context);
++ } else {
+ return false;
+ }
+- try{
+- if (target instanceof Component){
+- if (componentAppContextField == null) {
+- componentAppContextField = getField(Component.class, "appContext");
+- }
+- componentAppContextField.set(target, context);
+- } else if (target instanceof MenuComponent) {
+- if (menuComponentAppContextField == null) {
+- menuComponentAppContextField = getField(MenuComponent.class, "appContext");
+- }
+- menuComponentAppContextField.set(target, context);
+- }
+- } catch( IllegalAccessException e){
+- assert false;
+- }
+-
+ return true;
+ }
+
+@@ -444,23 +401,15 @@
+ * Component or MenuComponent this returns null.
+ */
+ private static AppContext getAppContext(Object target) {
+- AppContext retObj = null;
+- try{
+- if (target instanceof Component){
+- if (componentAppContextField == null) {
+- componentAppContextField = getField(Component.class, "appContext");
+- }
+- retObj = (AppContext) componentAppContextField.get(target);
+- } else if (target instanceof MenuComponent) {
+- if (menuComponentAppContextField == null) {
+- menuComponentAppContextField = getField(MenuComponent.class, "appContext");
+- }
+- retObj = (AppContext) menuComponentAppContextField.get(target);
+- }
+- } catch( IllegalAccessException e){
+- assert false;
++ if (target instanceof Component) {
++ return AWTAccessor.getComponentAccessor().
++ getAppContext((Component)target);
++ } else if (target instanceof MenuComponent) {
++ return AWTAccessor.getMenuComponentAccessor().
++ getAppContext((MenuComponent)target);
++ } else {
++ return null;
+ }
+- return retObj;
+ }
+
+ /*
+@@ -508,16 +457,7 @@
+ */
+
+ public static void setLWRequestStatus(Window changed,boolean status){
+- if (syncLWRequestsField == null){
+- syncLWRequestsField = getField(Window.class, "syncLWRequests");
+- }
+- try{
+- if (syncLWRequestsField != null){
+- syncLWRequestsField.setBoolean(changed, status);
+- }
+- } catch( IllegalAccessException e){
+- assert false;
+- }
++ AWTAccessor.getWindowAccessor().setLWRequestStatus(changed, status);
+ };
+
+ public static void checkAndSetPolicy(Container cont, boolean isSwingCont)
+@@ -625,18 +565,9 @@
+ * Post AWTEvent of high priority.
+ */
+ public static void postPriorityEvent(final AWTEvent e) {
+- if (isPostedField == null) {
+- isPostedField = getField(AWTEvent.class, "isPosted");
+- }
+ PeerEvent pe = new PeerEvent(Toolkit.getDefaultToolkit(), new Runnable() {
+ public void run() {
+- try {
+- isPostedField.setBoolean(e, true);
+- } catch (IllegalArgumentException e) {
+- assert(false);
+- } catch (IllegalAccessException e) {
+- assert(false);
+- }
++ AWTAccessor.getAWTEventAccessor().setPosted(e);
+ ((Component)e.getSource()).dispatchEvent(e);
+ }
+ }, PeerEvent.ULTIMATE_PRIORITY_EVENT);
+@@ -745,36 +676,6 @@
+ }
+
+ /*
+- * Returns next queue for the given EventQueue which has private access
+- */
+- private static EventQueue getNextQueue(final Object o) {
+- EventQueue result = null;
+- try{
+- Field nextQueueField = getField(EventQueue.class,
+- "nextQueue");
+- result = (EventQueue)nextQueueField.get(o);
+- } catch( IllegalAccessException e){
+- assert false;
+- }
+- return result;
+- }
+-
+- /*
+- * Returns dispatch thread for the given EventQueue which has private access
+- */
+- private static Thread getDispatchThread(final Object o) {
+- Thread result = null;
+- try{
+- Field dispatchThreadField = getField(EventQueue.class,
+- "dispatchThread");
+- result = (Thread)dispatchThreadField.get(o);
+- } catch( IllegalAccessException e){
+- assert false;
+- }
+- return result;
+- }
+-
+- /*
+ * Returns true if the calling thread is the event dispatch thread
+ * contained within AppContext which associated with the given target.
+ * Use this call to ensure that a given task is being executed
+@@ -784,13 +685,14 @@
+ AppContext appContext = targetToAppContext(target);
+ EventQueue eq = (EventQueue)appContext.get(AppContext.EVENT_QUEUE_KEY);
+
+- EventQueue next = getNextQueue(eq);
++ EventQueue next = AWTAccessor.getEventQueueAccessor().getNextQueue(eq);
+ while (next != null) {
+ eq = next;
+- next = getNextQueue(eq);
++ next = AWTAccessor.getEventQueueAccessor().getNextQueue(eq);
+ }
+
+- return (Thread.currentThread() == getDispatchThread(eq));
++ return (Thread.currentThread() == AWTAccessor.getEventQueueAccessor()
++ .getDispatchThread(eq));
+ }
+
+ public Dimension getScreenSize() {
+@@ -1524,22 +1426,6 @@
+ || comp instanceof Window);
+ }
+
+- public static Method getMethod(final Class clz, final String methodName, final Class[] params) {
+- Method res = null;
+- try {
+- res = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() {
+- public Method run() throws Exception {
+- Method m = clz.getDeclaredMethod(methodName, params);
+- m.setAccessible(true);
+- return m;
+- }
+- });
+- } catch (PrivilegedActionException ex) {
+- ex.printStackTrace();
+- }
+- return res;
+- }
+-
+ public static class OperationTimedOut extends RuntimeException {
+ public OperationTimedOut(String msg) {
+ super(msg);
+@@ -1682,21 +1568,9 @@
+ private boolean queueEmpty = false;
+ private final Object waitLock = "Wait Lock";
+
+- static Method eqNoEvents;
+-
+ private boolean isEQEmpty() {
+ EventQueue queue = getSystemEventQueueImpl();
+- synchronized(SunToolkit.class) {
+- if (eqNoEvents == null) {
+- eqNoEvents = getMethod(java.awt.EventQueue.class, "noEvents", null);
+- }
+- }
+- try {
+- return (Boolean)eqNoEvents.invoke(queue);
+- } catch (Exception e) {
+- e.printStackTrace();
+- return false;
+- }
++ return AWTAccessor.getEventQueueAccessor().noEvents(queue);
+ }
+
+ /**
+@@ -1951,20 +1825,14 @@
+ * consumeNextKeyTyped() method is not currently used,
+ * however Swing could use it in the future.
+ */
+- private static Method consumeNextKeyTypedMethod = null;
+ public static synchronized void consumeNextKeyTyped(KeyEvent keyEvent) {
+- if (consumeNextKeyTypedMethod == null) {
+- consumeNextKeyTypedMethod = getMethod(DefaultKeyboardFocusManager.class,
+- "consumeNextKeyTyped",
+- new Class[] {KeyEvent.class});
+- }
+ try {
+- consumeNextKeyTypedMethod.invoke(KeyboardFocusManager.getCurrentKeyboardFocusManager(),
+- keyEvent);
+- } catch (IllegalAccessException iae) {
+- iae.printStackTrace();
+- } catch (InvocationTargetException ite) {
+- ite.printStackTrace();
++ AWTAccessor.getDefaultKeyboardFocusManagerAccessor().consumeNextKeyTyped(
++ (DefaultKeyboardFocusManager)KeyboardFocusManager.
++ getCurrentKeyboardFocusManager(),
++ keyEvent);
++ } catch (ClassCastException cce) {
++ cce.printStackTrace();
+ }
+ }
+
+--- jdk/src/share/classes/sun/beans/editors/BooleanEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/BooleanEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,76 +0,0 @@
+-/*
+- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-/**
+- * Property editor for a java builtin "boolean" type.
+- */
+-
+-import java.beans.*;
+-
+-public class BooleanEditor extends PropertyEditorSupport {
+-
+-
+- public String getJavaInitializationString() {
+- Object value = getValue();
+- return (value != null)
+- ? value.toString()
+- : "null";
+- }
+-
+- public String getAsText() {
+- Object value = getValue();
+- return (value instanceof Boolean)
+- ? getValidName((Boolean) value)
+- : "null";
+- }
+-
+- public void setAsText(String text) throws java.lang.IllegalArgumentException {
+- if (text == null) {
+- setValue(null);
+- } else if (isValidName(true, text)) {
+- setValue(Boolean.TRUE);
+- } else if (isValidName(false, text)) {
+- setValue(Boolean.FALSE);
+- } else {
+- throw new java.lang.IllegalArgumentException(text);
+- }
+- }
+-
+- public String[] getTags() {
+- return new String[] {getValidName(true), getValidName(false)};
+- }
+-
+- // the following method should be localized (4890258)
+-
+- private String getValidName(boolean value) {
+- return value ? "True" : "False";
+- }
+-
+- private boolean isValidName(boolean value, String name) {
+- return getValidName(value).equalsIgnoreCase(name);
+- }
+-}
+--- jdk/src/share/classes/sun/beans/editors/ByteEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/ByteEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,48 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-/**
+- * Property editor for a java builtin "byte" type.
+- *
+- */
+-
+-import java.beans.*;
+-
+-public class ByteEditor extends NumberEditor {
+-
+- public String getJavaInitializationString() {
+- Object value = getValue();
+- return (value != null)
+- ? "((byte)" + value + ")"
+- : "null";
+- }
+-
+- public void setAsText(String text) throws IllegalArgumentException {
+- setValue((text == null) ? null : Byte.decode(text));
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/ColorEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/ColorEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,212 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-import java.awt.*;
+-import java.beans.*;
+-
+-public class ColorEditor extends Panel implements PropertyEditor {
+- public ColorEditor() {
+- setLayout(null);
+-
+- ourWidth = hPad;
+-
+- // Create a sample color block bordered in black
+- Panel p = new Panel();
+- p.setLayout(null);
+- p.setBackground(Color.black);
+- sample = new Canvas();
+- p.add(sample);
+- sample.reshape(2, 2, sampleWidth, sampleHeight);
+- add(p);
+- p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4);
+- ourWidth += sampleWidth + 4 + hPad;
+-
+- text = new TextField("", 14);
+- add(text);
+- text.reshape(ourWidth,0,100,30);
+- ourWidth += 100 + hPad;
+-
+- choser = new Choice();
+- int active = 0;
+- for (int i = 0; i < colorNames.length; i++) {
+- choser.addItem(colorNames[i]);
+- }
+- add(choser);
+- choser.reshape(ourWidth,0,100,30);
+- ourWidth += 100 + hPad;
+-
+- resize(ourWidth,40);
+- }
+-
+- public void setValue(Object o) {
+- Color c = (Color)o;
+- changeColor(c);
+- }
+-
+- public Dimension preferredSize() {
+- return new Dimension(ourWidth, 40);
+- }
+-
+- public boolean keyUp(Event e, int key) {
+- if (e.target == text) {
+- try {
+- setAsText(text.getText());
+- } catch (IllegalArgumentException ex) {
+- // Quietly ignore.
+- }
+- }
+- return (false);
+- }
+-
+- public void setAsText(String s) throws java.lang.IllegalArgumentException {
+- if (s == null) {
+- changeColor(null);
+- return;
+- }
+- int c1 = s.indexOf(',');
+- int c2 = s.indexOf(',', c1+1);
+- if (c1 < 0 || c2 < 0) {
+- // Invalid string.
+- throw new IllegalArgumentException(s);
+- }
+- try {
+- int r = Integer.parseInt(s.substring(0,c1));
+- int g = Integer.parseInt(s.substring(c1+1, c2));
+- int b = Integer.parseInt(s.substring(c2+1));
+- Color c = new Color(r,g,b);
+- changeColor(c);
+- } catch (Exception ex) {
+- throw new IllegalArgumentException(s);
+- }
+-
+- }
+-
+- public boolean action(Event e, Object arg) {
+- if (e.target == choser) {
+- changeColor(colors[choser.getSelectedIndex()]);
+- }
+- return false;
+- }
+-
+- public String getJavaInitializationString() {
+- return (this.color != null)
+- ? "new java.awt.Color(" + this.color.getRGB() + ",true)"
+- : "null";
+- }
+-
+-
+- private void changeColor(Color c) {
+-
+- if (c == null) {
+- this.color = null;
+- this.text.setText("");
+- return;
+- }
+-
+- color = c;
+-
+- text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue());
+-
+- int active = 0;
+- for (int i = 0; i < colorNames.length; i++) {
+- if (color.equals(colors[i])) {
+- active = i;
+- }
+- }
+- choser.select(active);
+-
+- sample.setBackground(color);
+- sample.repaint();
+-
+- support.firePropertyChange("", null, null);
+- }
+-
+- public Object getValue() {
+- return color;
+- }
+-
+- public boolean isPaintable() {
+- return true;
+- }
+-
+- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
+- Color oldColor = gfx.getColor();
+- gfx.setColor(Color.black);
+- gfx.drawRect(box.x, box.y, box.width-3, box.height-3);
+- gfx.setColor(color);
+- gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4);
+- gfx.setColor(oldColor);
+- }
+-
+- public String getAsText() {
+- return (this.color != null)
+- ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
+- : "null";
+- }
+-
+- public String[] getTags() {
+- return null;
+- }
+-
+- public java.awt.Component getCustomEditor() {
+- return this;
+- }
+-
+- public boolean supportsCustomEditor() {
+- return true;
+- }
+-
+- public void addPropertyChangeListener(PropertyChangeListener l) {
+- support.addPropertyChangeListener(l);
+- }
+-
+- public void removePropertyChangeListener(PropertyChangeListener l) {
+- support.removePropertyChangeListener(l);
+- }
+-
+-
+- private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray",
+- "black", "red", "pink", "orange",
+- "yellow", "green", "magenta", "cyan",
+- "blue"};
+- private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
+- Color.black, Color.red, Color.pink, Color.orange,
+- Color.yellow, Color.green, Color.magenta, Color.cyan,
+- Color.blue};
+-
+- private Canvas sample;
+- private int sampleHeight = 20;
+- private int sampleWidth = 40;
+- private int hPad = 5;
+- private int ourWidth;
+-
+- private Color color;
+- private TextField text;
+- private Choice choser;
+-
+- private PropertyChangeSupport support = new PropertyChangeSupport(this);
+-}
+--- jdk/src/share/classes/sun/beans/editors/DoubleEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/DoubleEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,41 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-/**
+- * Property editor for a java builtin "double" type.
+- *
+- */
+-
+-import java.beans.*;
+-
+-public class DoubleEditor extends NumberEditor {
+-
+- public void setAsText(String text) throws IllegalArgumentException {
+- setValue((text == null) ? null : Double.valueOf(text));
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,142 +0,0 @@
+-/*
+- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-package sun.beans.editors;
+-
+-import java.awt.Component;
+-import java.awt.Graphics;
+-import java.awt.Rectangle;
+-import java.beans.PropertyChangeEvent;
+-import java.beans.PropertyChangeListener;
+-import java.beans.PropertyEditor;
+-import java.util.ArrayList;
+-import java.util.List;
+-
+-/**
+- * Property editor for java.lang.Enum subclasses.
+- *
+- * @see PropertyEditor
+- *
+- * @since 1.7
+- *
+- * @author Sergey A. Malenkov
+- */
+-public final class EnumEditor implements PropertyEditor {
+- private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
+-
+- private final Class type;
+- private final String[] tags;
+-
+- private Object value;
+-
+- public EnumEditor( Class type ) {
+- Object[] values = type.getEnumConstants();
+- if ( values == null ) {
+- throw new IllegalArgumentException( "Unsupported " + type );
+- }
+- this.type = type;
+- this.tags = new String[values.length];
+- for ( int i = 0; i < values.length; i++ ) {
+- this.tags[i] = ( ( Enum )values[i] ).name();
+- }
+- }
+-
+- public Object getValue() {
+- return this.value;
+- }
+-
+- public void setValue( Object value ) {
+- if ( ( value != null ) && !this.type.isInstance( value ) ) {
+- throw new IllegalArgumentException( "Unsupported value: " + value );
+- }
+- Object oldValue;
+- PropertyChangeListener[] listeners;
+- synchronized ( this.listeners ) {
+- oldValue = this.value;
+- this.value = value;
+-
+- if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) {
+- return; // do not fire event if value is not changed
+- }
+- int size = this.listeners.size();
+- if ( size == 0 ) {
+- return; // do not fire event if there are no any listener
+- }
+- listeners = this.listeners.toArray( new PropertyChangeListener[size] );
+- }
+- PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value );
+- for ( PropertyChangeListener listener : listeners ) {
+- listener.propertyChange( event );
+- }
+- }
+-
+- public String getAsText() {
+- return ( this.value != null )
+- ? ( ( Enum )this.value ).name()
+- : "null";
+- }
+-
+- public void setAsText( String text ) {
+- setValue( ( text != null )
+- ? Enum.valueOf( this.type, text )
+- : null );
+- }
+-
+- public String[] getTags() {
+- return this.tags.clone();
+- }
+-
+- public String getJavaInitializationString() {
+- return ( this.value != null )
+- ? this.type.getName() + '.' + ( ( Enum )this.value ).name()
+- : "null";
+- }
+-
+- public boolean isPaintable() {
+- return false;
+- }
+-
+- public void paintValue( Graphics gfx, Rectangle box ) {
+- }
+-
+- public boolean supportsCustomEditor() {
+- return false;
+- }
+-
+- public Component getCustomEditor() {
+- return null;
+- }
+-
+- public void addPropertyChangeListener( PropertyChangeListener listener ) {
+- synchronized ( this.listeners ) {
+- this.listeners.add( listener );
+- }
+- }
+-
+- public void removePropertyChangeListener( PropertyChangeListener listener ) {
+- synchronized ( this.listeners ) {
+- this.listeners.remove( listener );
+- }
+- }
+-}
+--- jdk/src/share/classes/sun/beans/editors/FloatEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/FloatEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,48 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-/**
+- * Property editor for a java builtin "float" type.
+- *
+- */
+-
+-import java.beans.*;
+-
+-public class FloatEditor extends NumberEditor {
+-
+- public String getJavaInitializationString() {
+- Object value = getValue();
+- return (value != null)
+- ? value + "F"
+- : "null";
+- }
+-
+- public void setAsText(String text) throws IllegalArgumentException {
+- setValue((text == null) ? null : Float.valueOf(text));
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/FontEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/FontEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,218 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-import java.awt.*;
+-import java.beans.*;
+-
+-public class FontEditor extends Panel implements java.beans.PropertyEditor {
+-
+- public FontEditor() {
+- setLayout(null);
+-
+- toolkit = Toolkit.getDefaultToolkit();
+- fonts = toolkit.getFontList();
+-
+- familyChoser = new Choice();
+- for (int i = 0; i < fonts.length; i++) {
+- familyChoser.addItem(fonts[i]);
+- }
+- add(familyChoser);
+- familyChoser.reshape(20, 5, 100, 30);
+-
+- styleChoser = new Choice();
+- for (int i = 0; i < styleNames.length; i++) {
+- styleChoser.addItem(styleNames[i]);
+- }
+- add(styleChoser);
+- styleChoser.reshape(145, 5, 70, 30);
+-
+- sizeChoser = new Choice();
+- for (int i = 0; i < pointSizes.length; i++) {
+- sizeChoser.addItem("" + pointSizes[i]);
+- }
+- add(sizeChoser);
+- sizeChoser.reshape(220, 5, 70, 30);
+-
+- resize(300,40);
+- }
+-
+-
+- public Dimension preferredSize() {
+- return new Dimension(300, 40);
+- }
+-
+- public void setValue(Object o) {
+- font = (Font) o;
+- if (this.font == null)
+- return;
+-
+- changeFont(font);
+- // Update the current GUI choices.
+- for (int i = 0; i < fonts.length; i++) {
+- if (fonts[i].equals(font.getFamily())) {
+- familyChoser.select(i);
+- break;
+- }
+- }
+- for (int i = 0; i < styleNames.length; i++) {
+- if (font.getStyle() == styles[i]) {
+- styleChoser.select(i);
+- break;
+- }
+- }
+- for (int i = 0; i < pointSizes.length; i++) {
+- if (font.getSize() <= pointSizes[i]) {
+- sizeChoser.select(i);
+- break;
+- }
+- }
+- }
+-
+- private void changeFont(Font f) {
+- font = f;
+- if (sample != null) {
+- remove(sample);
+- }
+- sample = new Label(sampleText);
+- sample.setFont(font);
+- add(sample);
+- Component p = getParent();
+- if (p != null) {
+- p.invalidate();
+- p.layout();
+- }
+- invalidate();
+- layout();
+- repaint();
+- support.firePropertyChange("", null, null);
+- }
+-
+- public Object getValue() {
+- return (font);
+- }
+-
+- public String getJavaInitializationString() {
+- if (this.font == null)
+- return "null";
+-
+- return "new java.awt.Font(\"" + font.getName() + "\", " +
+- font.getStyle() + ", " + font.getSize() + ")";
+- }
+-
+- public boolean action(Event e, Object arg) {
+- String family = familyChoser.getSelectedItem();
+- int style = styles[styleChoser.getSelectedIndex()];
+- int size = pointSizes[sizeChoser.getSelectedIndex()];
+- try {
+- Font f = new Font(family, style, size);
+- changeFont(f);
+- } catch (Exception ex) {
+- System.err.println("Couldn't create font " + family + "-" +
+- styleNames[style] + "-" + size);
+- }
+- return (false);
+- }
+-
+-
+- public boolean isPaintable() {
+- return true;
+- }
+-
+- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
+- // Silent noop.
+- Font oldFont = gfx.getFont();
+- gfx.setFont(font);
+- FontMetrics fm = gfx.getFontMetrics();
+- int vpad = (box.height - fm.getAscent())/2;
+- gfx.drawString(sampleText, 0, box.height-vpad);
+- gfx.setFont(oldFont);
+- }
+-
+- public String getAsText() {
+- if (this.font == null) {
+- return "null";
+- }
+- StringBuilder sb = new StringBuilder();
+- sb.append(this.font.getName());
+- sb.append(' ');
+-
+- boolean b = this.font.isBold();
+- if (b) {
+- sb.append("BOLD");
+- }
+- boolean i = this.font.isItalic();
+- if (i) {
+- sb.append("ITALIC");
+- }
+- if (b || i) {
+- sb.append(' ');
+- }
+- sb.append(this.font.getSize());
+- return sb.toString();
+- }
+-
+- public void setAsText(String text) throws IllegalArgumentException {
+- setValue((text == null) ? null : Font.decode(text));
+- }
+-
+- public String[] getTags() {
+- return null;
+- }
+-
+- public java.awt.Component getCustomEditor() {
+- return this;
+- }
+-
+- public boolean supportsCustomEditor() {
+- return true;
+- }
+-
+- public void addPropertyChangeListener(PropertyChangeListener l) {
+- support.addPropertyChangeListener(l);
+- }
+-
+- public void removePropertyChangeListener(PropertyChangeListener l) {
+- support.removePropertyChangeListener(l);
+- }
+-
+- private Font font;
+- private Toolkit toolkit;
+- private String sampleText = "Abcde...";
+-
+- private Label sample;
+- private Choice familyChoser;
+- private Choice styleChoser;
+- private Choice sizeChoser;
+-
+- private String fonts[];
+- private String[] styleNames = { "plain", "bold", "italic" };
+- private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC };
+- private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 };
+-
+- private PropertyChangeSupport support = new PropertyChangeSupport(this);
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/IntegerEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/IntegerEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,42 +0,0 @@
+-/*
+- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-/**
+- * Property editor for a java builtin "int" type.
+- *
+- */
+-
+-import java.beans.*;
+-
+-public class IntegerEditor extends NumberEditor {
+-
+-
+- public void setAsText(String text) throws IllegalArgumentException {
+- setValue((text == null) ? null : Integer.decode(text));
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/LongEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/LongEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,48 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-/**
+- * Property editor for a java builtin "long" type.
+- *
+- */
+-
+-import java.beans.*;
+-
+-public class LongEditor extends NumberEditor {
+-
+- public String getJavaInitializationString() {
+- Object value = getValue();
+- return (value != null)
+- ? value + "L"
+- : "null";
+- }
+-
+- public void setAsText(String text) throws IllegalArgumentException {
+- setValue((text == null) ? null : Long.decode(text));
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/NumberEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/NumberEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,44 +0,0 @@
+-/*
+- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.editors;
+-
+-/**
+- * Abstract Property editor for a java builtin number types.
+- *
+- */
+-
+-import java.beans.*;
+-
+-abstract public class NumberEditor extends PropertyEditorSupport {
+-
+- public String getJavaInitializationString() {
+- Object value = getValue();
+- return (value != null)
+- ? value.toString()
+- : "null";
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/ShortEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/ShortEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,49 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-
+-package sun.beans.editors;
+-
+-/**
+- * Property editor for a java builtin "short" type.
+- *
+- */
+-
+-import java.beans.*;
+-
+-public class ShortEditor extends NumberEditor {
+-
+- public String getJavaInitializationString() {
+- Object value = getValue();
+- return (value != null)
+- ? "((short)" + value + ")"
+- : "null";
+- }
+-
+- public void setAsText(String text) throws IllegalArgumentException {
+- setValue((text == null) ? null : Short.decode(text));
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/editors/StringEditor.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/editors/StringEditor.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,74 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-
+-package sun.beans.editors;
+-
+-import java.beans.*;
+-
+-public class StringEditor extends PropertyEditorSupport {
+-
+- public String getJavaInitializationString() {
+- Object value = getValue();
+- if (value == null)
+- return "null";
+-
+- String str = value.toString();
+- int length = str.length();
+- StringBuilder sb = new StringBuilder(length + 2);
+- sb.append('"');
+- for (int i = 0; i < length; i++) {
+- char ch = str.charAt(i);
+- switch (ch) {
+- case '\b': sb.append("\\b"); break;
+- case '\t': sb.append("\\t"); break;
+- case '\n': sb.append("\\n"); break;
+- case '\f': sb.append("\\f"); break;
+- case '\r': sb.append("\\r"); break;
+- case '\"': sb.append("\\\""); break;
+- case '\\': sb.append("\\\\"); break;
+- default:
+- if ((ch < ' ') || (ch > '~')) {
+- sb.append("\\u");
+- String hex = Integer.toHexString((int) ch);
+- for (int len = hex.length(); len < 4; len++) {
+- sb.append('0');
+- }
+- sb.append(hex);
+- } else {
+- sb.append(ch);
+- }
+- break;
+- }
+- }
+- sb.append('"');
+- return sb.toString();
+- }
+-
+- public void setAsText(String text) {
+- setValue(text);
+- }
+-
+-}
+--- jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java 2012-05-01 17:18:19.000000000 -0400
++++ jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java 2012-09-05 19:35:34.000000000 -0400
+@@ -1,62 +0,0 @@
+-/*
+- * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.beans.infos;
+-
+-import java.beans.*;
+-
+-/**
+- * BeanInfo descriptor for a standard AWT component.
+- */
+-
+-public class ComponentBeanInfo extends SimpleBeanInfo {
+- private static final Class beanClass = java.awt.Component.class;
+-
+- public PropertyDescriptor[] getPropertyDescriptors() {
+- try {
+- PropertyDescriptor
+- name = new PropertyDescriptor("name", beanClass),
+- background = new PropertyDescriptor("background", beanClass),
+- foreground = new PropertyDescriptor("foreground", beanClass),
+- font = new PropertyDescriptor("font", beanClass),
+- enabled = new PropertyDescriptor("enabled", beanClass),
+- visible = new PropertyDescriptor("visible", beanClass),
+- focusable = new PropertyDescriptor("focusable", beanClass);
+-
+- enabled.setExpert(true);
+- visible.setHidden(true);
+-
+- background.setBound(true);
+- foreground.setBound(true);
+- font.setBound(true);
+- focusable.setBound(true);
+-
+- PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable };
+- return rv;
+- } catch (IntrospectionException e) {
+- throw new Error(e.toString());
+- }
+- }
+-}
+--- jdk/src/share/classes/sun/misc/IOUtils.java 2012-05-01 17:18:21.000000000 -0400
++++ jdk/src/share/classes/sun/misc/IOUtils.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
@@ -1273,8 +5061,8 @@
+ return SharedSecrets.getJavaIOFileAccess().createTempFile(prefix, suffix, null);
+ }
}
---- jdk/src/share/classes/sun/misc/JavaIOFileAccess.java.orig 2012-06-13 12:53:06.000000000 -0400
-+++ jdk/src/share/classes/sun/misc/JavaIOFileAccess.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/misc/JavaIOFileAccess.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/sun/misc/JavaIOFileAccess.java 2012-09-05 19:34:26.000000000 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
@@ -1311,8 +5099,8 @@
+ throws IOException;
+}
+
---- jdk/src/share/classes/sun/misc/SharedSecrets.java.orig 2012-05-01 17:18:21.000000000 -0400
-+++ jdk/src/share/classes/sun/misc/SharedSecrets.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/misc/SharedSecrets.java 2012-05-01 17:18:21.000000000 -0400
++++ jdk/src/share/classes/sun/misc/SharedSecrets.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
@@ -1341,8 +5129,8 @@
+ return javaIOFileAccess;
+ }
}
---- jdk/src/share/classes/sun/net/www/protocol/jar/URLJarFile.java.orig 2012-05-01 17:18:22.000000000 -0400
-+++ jdk/src/share/classes/sun/net/www/protocol/jar/URLJarFile.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/net/www/protocol/jar/URLJarFile.java 2012-05-01 17:18:22.000000000 -0400
++++ jdk/src/share/classes/sun/net/www/protocol/jar/URLJarFile.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -1359,8 +5147,8 @@
tmpFile.deleteOnExit();
out = new FileOutputStream(tmpFile);
int read = 0;
---- jdk/src/share/classes/sun/print/PSPrinterJob.java.orig 2012-05-01 17:18:24.000000000 -0400
-+++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-05-01 17:18:24.000000000 -0400
++++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -1377,8 +5165,8 @@
spoolFile.deleteOnExit();
result = new FileOutputStream(spoolFile);
---- jdk/src/share/classes/sun/rmi/server/Activation.java.orig 2012-05-01 17:18:25.000000000 -0400
-+++ jdk/src/share/classes/sun/rmi/server/Activation.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/rmi/server/Activation.java 2012-05-01 17:18:25.000000000 -0400
++++ jdk/src/share/classes/sun/rmi/server/Activation.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -1395,8 +5183,8 @@
PrintStream errStream =
new PrintStream(new FileOutputStream(file));
System.setErr(errStream);
---- jdk/src/share/classes/sun/security/x509/CRLExtensions.java.orig 2012-05-01 17:18:27.000000000 -0400
-+++ jdk/src/share/classes/sun/security/x509/CRLExtensions.java 2012-06-13 12:53:40.000000000 -0400
+--- jdk/src/share/classes/sun/security/x509/CRLExtensions.java 2012-05-01 17:18:27.000000000 -0400
++++ jdk/src/share/classes/sun/security/x509/CRLExtensions.java 2012-09-05 19:34:26.000000000 -0400
@@ -32,8 +32,10 @@
import java.security.cert.CRLException;
import java.security.cert.CertificateException;
@@ -1428,8 +5216,8 @@
}
/**
---- jdk/src/share/classes/sun/security/x509/CertificateExtensions.java.orig 2012-05-01 17:18:27.000000000 -0400
-+++ jdk/src/share/classes/sun/security/x509/CertificateExtensions.java 2012-06-13 12:53:40.000000000 -0400
+--- jdk/src/share/classes/sun/security/x509/CertificateExtensions.java 2012-05-01 17:18:27.000000000 -0400
++++ jdk/src/share/classes/sun/security/x509/CertificateExtensions.java 2012-09-05 19:34:26.000000000 -0400
@@ -57,7 +57,8 @@
private static final Debug debug = Debug.getInstance("x509");
@@ -1471,8 +5259,8 @@
}
/**
---- jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java.orig 2012-05-01 17:18:27.000000000 -0400
-+++ jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java 2012-06-13 12:53:40.000000000 -0400
+--- jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java 2012-05-01 17:18:27.000000000 -0400
++++ jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java 2012-09-05 19:34:26.000000000 -0400
@@ -31,11 +31,7 @@
import java.security.cert.CertificateException;
import java.security.cert.X509CRLEntry;
@@ -1555,8 +5343,8 @@
+ }
+ }
}
---- jdk/src/share/classes/sun/security/x509/X509CRLImpl.java.orig 2012-05-01 17:18:27.000000000 -0400
-+++ jdk/src/share/classes/sun/security/x509/X509CRLImpl.java 2012-06-13 12:53:40.000000000 -0400
+--- jdk/src/share/classes/sun/security/x509/X509CRLImpl.java 2012-05-01 17:18:27.000000000 -0400
++++ jdk/src/share/classes/sun/security/x509/X509CRLImpl.java 2012-09-05 19:34:26.000000000 -0400
@@ -53,7 +53,7 @@
/**
@@ -1726,8 +5514,8 @@
+ }
}
}
---- jdk/src/share/classes/sun/security/x509/X509CertImpl.java.orig 2012-05-01 17:18:27.000000000 -0400
-+++ jdk/src/share/classes/sun/security/x509/X509CertImpl.java 2012-06-13 12:53:40.000000000 -0400
+--- jdk/src/share/classes/sun/security/x509/X509CertImpl.java 2012-05-01 17:18:27.000000000 -0400
++++ jdk/src/share/classes/sun/security/x509/X509CertImpl.java 2012-09-05 19:34:26.000000000 -0400
@@ -1214,7 +1214,7 @@
if (exts == null) {
return null;
@@ -1782,8 +5570,8 @@
for (List<?> nameEntry : altNames) {
Object nameObject = nameEntry.get(1);
if (nameObject instanceof byte[]) {
---- jdk/src/share/classes/sun/tools/jar/Main.java.orig 2012-05-01 17:18:28.000000000 -0400
-+++ jdk/src/share/classes/sun/tools/jar/Main.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/tools/jar/Main.java 2012-05-01 17:18:28.000000000 -0400
++++ jdk/src/share/classes/sun/tools/jar/Main.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -1808,8 +5596,8 @@
}
private boolean ok;
---- jdk/src/share/classes/sun/tools/native2ascii/Main.java.orig 2012-05-01 17:18:28.000000000 -0400
-+++ jdk/src/share/classes/sun/tools/native2ascii/Main.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/share/classes/sun/tools/native2ascii/Main.java 2012-05-01 17:18:28.000000000 -0400
++++ jdk/src/share/classes/sun/tools/native2ascii/Main.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
@@ -1828,9 +5616,18 @@
tempFile.deleteOnExit();
try {
---- jdk/src/share/lib/security/java.security-solaris.orig 2012-05-01 17:18:31.000000000 -0400
-+++ jdk/src/share/lib/security/java.security-solaris 2012-06-13 12:54:10.000000000 -0400
-@@ -137,10 +137,10 @@
+--- jdk/src/share/lib/security/java.security 2012-05-01 17:18:31.000000000 -0400
++++ jdk/src/share/lib/security/java.security 2012-09-05 19:34:26.000000000 -0400
+@@ -127,7 +127,7 @@
+ # passed to checkPackageAccess unless the
+ # corresponding RuntimePermission ("accessClassInPackage."+package) has
+ # been granted.
+-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.
++package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
+
+ #
+ # List of comma-separated packages that start with or equal this string
+@@ -136,10 +136,10 @@
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
@@ -1844,8 +5641,8 @@
#
# Determines whether this properties file can be appended to
---- jdk/src/share/lib/security/java.security-windows.orig 2012-05-01 17:18:31.000000000 -0400
-+++ jdk/src/share/lib/security/java.security-windows 2012-06-13 12:54:10.000000000 -0400
+--- jdk/src/share/lib/security/java.security-solaris 2012-05-01 17:18:31.000000000 -0400
++++ jdk/src/share/lib/security/java.security-solaris 2012-09-05 19:34:26.000000000 -0400
@@ -137,10 +137,10 @@
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
@@ -1860,18 +5657,9 @@
#
# Determines whether this properties file can be appended to
---- jdk/src/share/lib/security/java.security.orig 2012-05-01 17:18:31.000000000 -0400
-+++ jdk/src/share/lib/security/java.security 2012-06-13 12:54:10.000000000 -0400
-@@ -127,7 +127,7 @@
- # passed to checkPackageAccess unless the
- # corresponding RuntimePermission ("accessClassInPackage."+package) has
- # been granted.
--package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.
-+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
-
- #
- # List of comma-separated packages that start with or equal this string
-@@ -136,10 +136,10 @@
+--- jdk/src/share/lib/security/java.security-windows 2012-05-01 17:18:31.000000000 -0400
++++ jdk/src/share/lib/security/java.security-windows 2012-09-05 19:34:26.000000000 -0400
+@@ -137,10 +137,10 @@
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
@@ -1885,8 +5673,8 @@
#
# Determines whether this properties file can be appended to
---- jdk/src/share/native/sun/font/layout/LookupProcessor.cpp.orig 2012-05-01 17:18:33.000000000 -0400
-+++ jdk/src/share/native/sun/font/layout/LookupProcessor.cpp 2012-06-13 12:53:16.000000000 -0400
+--- jdk/src/share/native/sun/font/layout/LookupProcessor.cpp 2012-05-01 17:18:33.000000000 -0400
++++ jdk/src/share/native/sun/font/layout/LookupProcessor.cpp 2012-09-05 19:34:26.000000000 -0400
@@ -86,6 +86,10 @@
if (selectMask != 0) {
@@ -1937,8 +5725,8 @@
featureReferences += SWAPW(featureTable->lookupCount);
}
---- jdk/src/share/native/sun/font/layout/LookupProcessor.h.orig 2012-05-01 17:18:33.000000000 -0400
-+++ jdk/src/share/native/sun/font/layout/LookupProcessor.h 2012-06-13 12:53:16.000000000 -0400
+--- jdk/src/share/native/sun/font/layout/LookupProcessor.h 2012-05-01 17:18:33.000000000 -0400
++++ jdk/src/share/native/sun/font/layout/LookupProcessor.h 2012-09-05 19:34:26.000000000 -0400
@@ -77,6 +77,7 @@
const FeatureListTable *featureListTable;
@@ -1947,8 +5735,8 @@
le_uint16 *lookupOrderArray;
le_uint32 lookupOrderCount;
---- jdk/src/solaris/classes/java/io/UnixFileSystem.java.orig 2012-05-01 17:18:34.000000000 -0400
-+++ jdk/src/solaris/classes/java/io/UnixFileSystem.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/solaris/classes/java/io/UnixFileSystem.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/java/io/UnixFileSystem.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
@@ -1965,8 +5753,974 @@
throws IOException;
public boolean delete(File f) {
// Keep canonicalization caches in sync after file deletion
---- jdk/src/solaris/classes/sun/print/UnixPrintJob.java.orig 2012-05-01 17:18:35.000000000 -0400
-+++ jdk/src/solaris/classes/sun/print/UnixPrintJob.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -29,27 +29,12 @@
+ import java.awt.peer.*;
+ import java.awt.event.*;
+
+-import java.lang.reflect.Field;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ class XCheckboxMenuItemPeer extends XMenuItemPeer implements CheckboxMenuItemPeer {
+
+ /************************************************
+ *
+- * Data members
+- *
+- ************************************************/
+-
+- /*
+- * CheckboxMenuItem's fields
+- */
+- private final static Field f_state;
+- static {
+- f_state = SunToolkit.getField(CheckboxMenuItem.class, "state");
+- }
+-
+- /************************************************
+- *
+ * Construction
+ *
+ ************************************************/
+@@ -74,16 +59,8 @@
+ *
+ ************************************************/
+ boolean getTargetState() {
+- MenuItem target = getTarget();
+- if (target == null) {
+- return false;
+- }
+- try {
+- return f_state.getBoolean(target);
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- }
+- return false;
++ return AWTAccessor.getCheckboxMenuItemAccessor()
++ .getState((CheckboxMenuItem)getTarget());
+ }
+
+ /************************************************
+--- jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -31,17 +31,13 @@
+ import java.awt.Component;
+ import java.awt.Container;
+ import java.awt.Cursor;
+-import java.awt.DefaultKeyboardFocusManager;
+ import java.awt.Dimension;
+-import java.awt.Event;
+ import java.awt.Font;
+ import java.awt.FontMetrics;
+ import java.awt.Graphics;
+ import java.awt.Image;
+ import java.awt.Insets;
+ import java.awt.KeyboardFocusManager;
+-import java.awt.MenuBar;
+-import java.awt.Point;
+ import java.awt.Rectangle;
+ import java.awt.SystemColor;
+ import java.awt.Toolkit;
+@@ -60,12 +56,9 @@
+ import java.awt.image.ImageObserver;
+ import java.awt.image.ImageProducer;
+ import java.awt.image.VolatileImage;
+-import java.awt.peer.CanvasPeer;
+ import java.awt.peer.ComponentPeer;
+ import java.awt.peer.ContainerPeer;
+ import java.awt.peer.LightweightPeer;
+-import java.awt.peer.PanelPeer;
+-import java.awt.peer.WindowPeer;
+ import java.lang.reflect.*;
+ import java.security.*;
+ import java.util.Collection;
+@@ -397,19 +390,8 @@
+ }
+ }
+
+- static Method requestFocusWithCause;
+-
+ static void callRequestFocus(Component target, CausedFocusEvent.Cause cause) {
+- if (requestFocusWithCause == null) {
+- requestFocusWithCause = SunToolkit.getMethod(Component.class, "requestFocus", new Class[] {CausedFocusEvent.Cause.class});
+- }
+- if (requestFocusWithCause != null) {
+- try {
+- requestFocusWithCause.invoke(target, new Object[] {cause});
+- } catch (Exception e) {
+- e.printStackTrace();
+- }
+- }
++ AWTAccessor.getComponentAccessor().requestFocus(target, cause);
+ }
+
+ final public boolean requestFocus(Component lightweightChild, boolean temporary,
+--- jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -29,14 +29,7 @@
+ import java.awt.dnd.DropTarget;
+ import java.awt.dnd.DropTargetListener;
+ import java.awt.event.*;
+-import java.awt.image.ColorModel;
+-import java.awt.image.ImageObserver;
+-import java.awt.image.ImageProducer;
+-import java.awt.image.VolatileImage;
+-import java.awt.peer.*;
+ import sun.awt.*;
+-import sun.awt.motif.X11FontMetrics;
+-import java.lang.reflect.*;
+ import java.util.logging.*;
+ import java.util.*;
+ import static sun.awt.X11.XEmbedHelper.*;
+@@ -455,16 +448,8 @@
+ }
+ }
+
+- static Field bdataField;
+ static byte[] getBData(KeyEvent e) {
+- try {
+- if (bdataField == null) {
+- bdataField = SunToolkit.getField(java.awt.AWTEvent.class, "bdata");
+- }
+- return (byte[])bdataField.get(e);
+- } catch (IllegalAccessException ex) {
+- return null;
+- }
++ return AWTAccessor.getAWTEventAccessor().getBData(e);
+ }
+
+ void forwardKeyEvent(KeyEvent e) {
+--- jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -28,8 +28,7 @@
+ import java.awt.*;
+ import java.util.HashMap;
+ import java.awt.event.KeyEvent;
+-import java.lang.reflect.*;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ public class XEmbeddingContainer extends XEmbedHelper implements XEventDispatcher {
+ HashMap children = new HashMap();
+@@ -127,20 +126,8 @@
+ }
+ }
+
+- static Field bdata;
+- byte[] getBData(KeyEvent e) {
+- try {
+- if (bdata == null) {
+- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata");
+- }
+- return (byte[])bdata.get(e);
+- } catch (IllegalAccessException ex) {
+- return null;
+- }
+- }
+-
+ void forwardKeyEvent(long child, KeyEvent e) {
+- byte[] bdata = getBData(e);
++ byte[] bdata = AWTAccessor.getAWTEventAccessor().getBData(e);
+ long data = Native.toData(bdata);
+ if (data == 0) {
+ return;
+--- jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java 2012-09-05 19:35:40.000000000 -0400
+@@ -29,32 +29,13 @@
+ import java.awt.peer.ComponentPeer;
+ import java.awt.peer.LightweightPeer;
+ import java.lang.ref.WeakReference;
+-import java.lang.reflect.Field;
+-import java.lang.reflect.Method;
+ import sun.awt.ComponentAccessor;
+
+ import sun.awt.GlobalCursorManager;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ public final class XGlobalCursorManager extends GlobalCursorManager {
+
+- private static Field field_pData;
+- private static Field field_type;
+- private static Class cursorClass;
+- private static Method method_setPData;
+- static {
+- cursorClass = java.awt.Cursor.class;
+- field_pData = SunToolkit.getField(cursorClass, "pData");
+- field_type = SunToolkit.getField(cursorClass, "type");
+- method_setPData = SunToolkit.getMethod(cursorClass, "setPData", new Class[] {long.class});
+- if (field_pData == null || field_type == null || method_setPData == null) {
+- System.out.println("Unable to initialize XGlobalCursorManager: ");
+- Thread.dumpStack();
+-
+- }
+- }
+-
+-
+ // cached nativeContainer
+ private WeakReference<Component> nativeContainer;
+
+@@ -216,8 +197,8 @@
+ long pData = 0;
+ int type = 0;
+ try {
+- pData = field_pData.getLong(c);
+- type = field_type.getInt(c);
++ pData = AWTAccessor.getCursorAccessor().getPData(c);
++ type = AWTAccessor.getCursorAccessor().getType(c);
+ }
+ catch (Exception e)
+ {
+@@ -287,7 +268,7 @@
+
+ static void setPData(Cursor c, long pData) {
+ try {
+- method_setPData.invoke(c, pData);
++ AWTAccessor.getCursorAccessor().setPData(c, pData);
+ }
+ catch (Exception e)
+ {
+--- jdk/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -32,14 +32,11 @@
+
+ import java.awt.peer.KeyboardFocusManagerPeer;
+
+-import java.lang.reflect.InvocationTargetException;
+-import java.lang.reflect.Method;
+-
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+
+ import sun.awt.CausedFocusEvent;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ public class XKeyboardFocusManagerPeer implements KeyboardFocusManagerPeer {
+ private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
+@@ -130,46 +127,16 @@
+ return true;
+ }
+
+- static Method shouldNativelyFocusHeavyweightMethod;
+-
+ static int shouldNativelyFocusHeavyweight(Component heavyweight,
+ Component descendant, boolean temporary,
+ boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)
+ {
+- if (shouldNativelyFocusHeavyweightMethod == null) {
+- Class[] arg_types =
+- new Class[] { Component.class,
+- Component.class,
+- Boolean.TYPE,
+- Boolean.TYPE,
+- Long.TYPE,
+- CausedFocusEvent.Cause.class
+- };
+-
+- shouldNativelyFocusHeavyweightMethod =
+- SunToolkit.getMethod(KeyboardFocusManager.class,
+- "shouldNativelyFocusHeavyweight",
+- arg_types);
+- }
+- Object[] args = new Object[] { heavyweight,
+- descendant,
+- Boolean.valueOf(temporary),
+- Boolean.valueOf(focusedWindowChangeAllowed),
+- Long.valueOf(time), cause};
+-
+- int result = XComponentPeer.SNFH_FAILURE;
+- if (shouldNativelyFocusHeavyweightMethod != null) {
+- try {
+- result = ((Integer) shouldNativelyFocusHeavyweightMethod.invoke(null, args)).intValue();
+- }
+- catch (IllegalAccessException e) {
+- assert false;
+- }
+- catch (InvocationTargetException e) {
+- assert false;
+- }
+- }
+-
+- return result;
++ return AWTAccessor.getKeyboardFocusManagerAccessor()
++ .shouldNativelyFocusHeavyweight(heavyweight,
++ descendant,
++ temporary,
++ focusedWindowChangeAllowed,
++ time,
++ cause);
+ }
+ }
+--- jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -28,10 +28,9 @@
+ import java.awt.peer.*;
+ import java.awt.event.*;
+
+-import java.lang.reflect.Field;
+ import java.util.Vector;
+ import java.util.logging.*;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
+
+@@ -67,15 +66,6 @@
+ private final static int BAR_ITEM_MARGIN_TOP = 2;
+ private final static int BAR_ITEM_MARGIN_BOTTOM = 2;
+
+- //fields
+- private static Field f_helpMenu;
+- private static Field f_menus;
+-
+- static {
+- f_helpMenu = SunToolkit.getField(MenuBar.class, "helpMenu");
+- f_menus = SunToolkit.getField(MenuBar.class, "menus");
+- }
+-
+ /************************************************
+ *
+ * Mapping data
+@@ -204,19 +194,12 @@
+ */
+ void postInit(XCreateWindowParams params) {
+ super.postInit(params);
+- Vector targetMenuVector = null;
+- Menu targetHelpMenu = null;
+- try {
+- // Get menus from the target.
+- targetMenuVector = (Vector)f_menus.get(menuBarTarget);
+- targetHelpMenu = (Menu)f_helpMenu.get(menuBarTarget);
+- reloadItems(targetMenuVector);
+- } catch (IllegalAccessException iae) {
+- iae.printStackTrace();
+- }
+- if (targetHelpMenu != null) {
+- addHelpMenu(targetHelpMenu);
+- }
++ // Get menus from the target.
++ Vector targetMenuVector = AWTAccessor.getMenuBarAccessor()
++ .getMenus(menuBarTarget);
++ Menu targetHelpMenu = AWTAccessor.getMenuBarAccessor()
++ .getHelpMenu(menuBarTarget);
++ reloadItems(targetMenuVector);
+ xSetVisible(true);
+ toFront();
+ }
+--- jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -28,12 +28,7 @@
+ import java.awt.peer.*;
+ import java.awt.event.*;
+
+-import java.util.logging.*;
+-
+-import java.lang.reflect.Field;
+-import java.lang.reflect.Method;
+-import java.lang.reflect.InvocationTargetException;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ public class XMenuItemPeer implements MenuItemPeer {
+
+@@ -83,24 +78,6 @@
+ private final static int SEPARATOR_WIDTH = 20;
+ private final static int SEPARATOR_HEIGHT = 5;
+
+- /*
+- * MenuItem's fields & methods
+- */
+- private final static Field f_enabled;
+- private final static Field f_label;
+- private final static Field f_shortcut;
+- private final static Method m_getFont;
+- private final static Method m_isItemEnabled;
+- private final static Method m_getActionCommand;
+- static {
+- f_enabled = SunToolkit.getField(MenuItem.class, "enabled");
+- f_label = SunToolkit.getField(MenuItem.class, "label");
+- f_shortcut = SunToolkit.getField(MenuItem.class, "shortcut");
+-
+- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null);
+- m_getActionCommand = SunToolkit.getMethod(MenuItem.class, "getActionCommandImpl", null);
+- m_isItemEnabled = SunToolkit.getMethod(MenuItem.class, "isItemEnabled", null);
+- }
+ /************************************************
+ *
+ * Text Metrics
+@@ -218,39 +195,21 @@
+ if (target == null) {
+ return XWindow.defaultFont;
+ }
+- try {
+- return (Font)m_getFont.invoke(target, new Object[0]);
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- } catch (InvocationTargetException e) {
+- e.printStackTrace();
+- }
+- return XWindow.defaultFont;
++ return AWTAccessor.getMenuComponentAccessor().getFont_NoClientCode(target);
+ }
+
+ String getTargetLabel() {
+ if (target == null) {
+ return "";
+ }
+- try {
+- String label = (String)f_label.get(target);
+- return (label == null) ? "" : label;
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- }
+- return "";
++ return AWTAccessor.getMenuItemAccessor().getLabel(target);
+ }
+
+ boolean isTargetEnabled() {
+ if (target == null) {
+ return false;
+ }
+- try {
+- return f_enabled.getBoolean(target);
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- }
+- return false;
++ return AWTAccessor.getMenuItemAccessor().isEnabled(target);
+ }
+
+ /**
+@@ -262,40 +221,21 @@
+ if (target == null) {
+ return false;
+ }
+- try {
+- return ((Boolean)m_isItemEnabled.invoke(target, new Object[0])).booleanValue();
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- } catch (InvocationTargetException e) {
+- e.printStackTrace();
+- }
+- return false;
++ return AWTAccessor.getMenuItemAccessor().isItemEnabled(target);
+ }
+
+ String getTargetActionCommand() {
+ if (target == null) {
+ return "";
+ }
+- try {
+- return (String) m_getActionCommand.invoke(target,(Object[]) null);
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- } catch (InvocationTargetException e) {
+- e.printStackTrace();
+- }
+- return "";
++ return AWTAccessor.getMenuItemAccessor().getActionCommandImpl(target);
+ }
+
+ MenuShortcut getTargetShortcut() {
+ if (target == null) {
+ return null;
+ }
+- try {
+- return (MenuShortcut)f_shortcut.get(target);
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- }
+- return null;
++ return AWTAccessor.getMenuItemAccessor().getShortcut(target);
+ }
+
+ String getShortcutText() {
+--- jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -27,10 +27,9 @@
+ import java.awt.*;
+ import java.awt.peer.*;
+
+-import java.lang.reflect.Field;
+ import java.util.Vector;
+ import java.util.logging.*;
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
+
+@@ -46,16 +45,6 @@
+ */
+ XMenuWindow menuWindow;
+
+-
+- /*
+- * Menu's fields & methods
+- */
+- private final static Field f_items;
+-
+- static {
+- f_items = SunToolkit.getField(Menu.class, "items");
+- }
+-
+ /************************************************
+ *
+ * Construction
+@@ -153,12 +142,7 @@
+ *
+ ************************************************/
+ Vector getTargetItems() {
+- try {
+- return (Vector)f_items.get(getTarget());
+- } catch (IllegalAccessException iae) {
+- iae.printStackTrace();
+- return null;
+- }
++ return AWTAccessor.getMenuAccessor().getItems((Menu)getTarget());
+ }
+
+ /************************************************
+--- jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -28,15 +28,10 @@
+ import java.awt.peer.*;
+ import java.awt.event.*;
+
+-import java.lang.reflect.Field;
+-import java.lang.reflect.Method;
+-import java.lang.reflect.InvocationTargetException;
+-
+ import java.util.Vector;
++import sun.awt.AWTAccessor;
+ import java.util.logging.*;
+
+-import sun.awt.SunToolkit;
+-
+ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {
+
+ /************************************************
+@@ -66,24 +61,6 @@
+ private final static int CAPTION_MARGIN_TOP = 4;
+ private final static int CAPTION_SEPARATOR_HEIGHT = 6;
+
+- /*
+- * Menu's fields & methods
+- */
+- //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false)
+- private final static Field f_enabled;
+- //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit
+- private final static Field f_label;
+- private final static Method m_getFont;
+- private final static Field f_items;
+-
+- static {
+- f_enabled = SunToolkit.getField(MenuItem.class, "enabled");
+- f_label = SunToolkit.getField(MenuItem.class, "label");
+- f_items = SunToolkit.getField(Menu.class, "items");
+- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null);
+- }
+-
+-
+ /************************************************
+ *
+ * Construction
+@@ -189,27 +166,16 @@
+ if (popupMenuTarget == null) {
+ return XWindow.defaultFont;
+ }
+- try {
+- return (Font)m_getFont.invoke(popupMenuTarget, new Object[0]);
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- } catch (InvocationTargetException e) {
+- e.printStackTrace();
+- }
+- return XWindow.defaultFont;
++ return AWTAccessor.getMenuComponentAccessor()
++ .getFont_NoClientCode(popupMenuTarget);
+ }
+
++ //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit
+ String getTargetLabel() {
+ if (target == null) {
+ return "";
+ }
+- try {
+- String label = (String)f_label.get(popupMenuTarget);
+- return (label == null) ? "" : label;
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- }
+- return "";
++ return AWTAccessor.getMenuItemAccessor().getLabel(popupMenuTarget);
+ }
+
+ //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false)
+@@ -217,21 +183,14 @@
+ if (popupMenuTarget == null) {
+ return false;
+ }
+- try {
+- return f_enabled.getBoolean(popupMenuTarget);
+- } catch (IllegalAccessException e) {
+- e.printStackTrace();
+- }
+- return false;
++ return AWTAccessor.getMenuItemAccessor().isEnabled(popupMenuTarget);
+ }
+
+ Vector getMenuTargetItems() {
+- try {
+- return (Vector)f_items.get(popupMenuTarget);
+- } catch (IllegalAccessException iae) {
+- iae.printStackTrace();
++ if (popupMenuTarget == null) {
+ return null;
+ }
++ return AWTAccessor.getMenuAccessor().getItems(popupMenuTarget);
+ }
+
+ /************************************************
+--- jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -28,8 +28,8 @@
+ import java.awt.*;
+ import java.awt.event.*;
+ import java.awt.peer.*;
+-import java.lang.reflect.*;
+-import sun.awt.SunToolkit;
++
++import sun.awt.AWTAccessor;
+
+ class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollbarClient {
+
+@@ -41,9 +41,7 @@
+ public final static int VERTICAL = 1 << 0;
+ public final static int HORIZONTAL = 1 << 1;
+
+- private static Method m_setValue;
+ static {
+- m_setValue = SunToolkit.getMethod(ScrollPaneAdjustable.class, "setTypedValue", new Class[] {Integer.TYPE, Integer.TYPE});
+ SCROLLBAR = XToolkit.getUIDefaults().getInt("ScrollBar.defaultWidth");
+ }
+
+@@ -316,16 +314,8 @@
+ }
+
+ void setAdjustableValue(ScrollPaneAdjustable adj, int value, int type) {
+- try {
+- m_setValue.invoke(adj, new Object[] {Integer.valueOf(value), Integer.valueOf(type)});
+- } catch (IllegalAccessException iae) {
+- adj.setValue(value);
+- } catch (IllegalArgumentException iae2) {
+- adj.setValue(value);
+- } catch (InvocationTargetException ite) {
+- adj.setValue(value);
+- ite.getCause().printStackTrace();
+- }
++ AWTAccessor.getScrollPaneAdjustableAccessor().setTypedValue(adj, value,
++ type);
+ }
+
+
+--- jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -61,6 +61,7 @@
+ import java.awt.im.InputMethodRequests;
+ import sun.awt.CausedFocusEvent;
+ import sun.awt.ComponentAccessor;
++import sun.awt.AWTAccessor;
+
+
+ class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
+@@ -985,8 +986,10 @@
+ // loading SystemFlavorMap and associated classes.
+ public void setTransferHandler(TransferHandler newHandler) {
+ TransferHandler oldHandler = (TransferHandler)
+- getClientProperty(XTextTransferHelper.getTransferHandlerKey());
+- putClientProperty(XTextTransferHelper.getTransferHandlerKey(),
++ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
++ .getJComponent_TRANSFER_HANDLER());
++ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
++ .getJComponent_TRANSFER_HANDLER(),
+ newHandler);
+
+ firePropertyChange("transferHandler", oldHandler, newHandler);
+--- jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -55,6 +55,7 @@
+ import java.util.logging.*;
+ import sun.awt.CausedFocusEvent;
+ import sun.awt.ComponentAccessor;
++import sun.awt.AWTAccessor;
+
+ public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
+ private static final Logger log = Logger.getLogger("sun.awt.X11.XTextField");
+@@ -714,8 +715,10 @@
+ // loading SystemFlavorMap and associated classes.
+ public void setTransferHandler(TransferHandler newHandler) {
+ TransferHandler oldHandler = (TransferHandler)
+- getClientProperty(XTextTransferHelper.getTransferHandlerKey());
+- putClientProperty(XTextTransferHelper.getTransferHandlerKey(),
++ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
++ .getJComponent_TRANSFER_HANDLER());
++ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
++ .getJComponent_TRANSFER_HANDLER(),
+ newHandler);
+
+ firePropertyChange("transferHandler", oldHandler, newHandler);
+--- jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java 2012-09-05 19:35:40.000000000 -0400
+@@ -1,47 +0,0 @@
+-/*
+- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package sun.awt.X11;
+-
+-import java.lang.reflect.Field;
+-import sun.awt.SunToolkit;
+-
+-class XTextTransferHelper {
+- private static Object transferHandlerKey = null;
+- static Object getTransferHandlerKey() {
+- if (transferHandlerKey == null) {
+- try {
+- Class clazz = Class.forName("javax.swing.ClientPropertyKey");
+- Field field = SunToolkit.getField(clazz, "JComponent_TRANSFER_HANDLER");
+- transferHandlerKey = field.get(null);
+- } catch (IllegalAccessException ex) {
+- return null;
+- } catch (ClassNotFoundException cnfe) {
+- cnfe.printStackTrace();
+- }
+- }
+- return transferHandlerKey;
+- }
+-}
+--- jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2012-09-05 19:35:40.000000000 -0400
+@@ -49,7 +49,7 @@
+ import sun.misc.PerformanceLogger;
+ import sun.print.PrintJob2D;
+ import sun.security.action.GetBooleanAction;
+-import java.lang.reflect.*;
++import sun.security.action.GetPropertyAction;
+
+ public class XToolkit extends UNIXToolkit implements Runnable, XConstants {
+ private static Logger log = Logger.getLogger("sun.awt.X11.XToolkit");
+@@ -102,7 +102,6 @@
+ private static int screenWidth = -1, screenHeight = -1; // Dimensions of default screen
+ static long awt_defaultFg; // Pixel
+ private static XMouseInfoPeer xPeer;
+- private static Method m_removeSourceEvents;
+
+ static {
+ initSecurityWarning();
+@@ -120,9 +119,9 @@
+ initIDs();
+ setBackingStoreType();
+ }
+- m_removeSourceEvents = SunToolkit.getMethod(EventQueue.class, "removeSourceEvents", new Class[] {Object.class, Boolean.TYPE}) ;
+
+- noisyAwtHandler = AccessController.doPrivileged(new GetBooleanAction("sun.awt.noisyerrorhandler"));
++ noisyAwtHandler = AccessController.doPrivileged(
++ new GetBooleanAction("sun.awt.noisyerrorhandler"));
+ }
+
+ //---- ERROR HANDLER CODE ----//
+@@ -203,7 +202,8 @@
+
+ static void initSecurityWarning() {
+ // Enable warning only for internal builds
+- String runtime = getSystemProperty("java.runtime.version");
++ String runtime = AccessController.doPrivileged(
++ new GetPropertyAction("java.runtime.version"));
+ securityWarningEnabled = (runtime != null && runtime.contains("internal"));
+ }
+
+@@ -1126,14 +1126,6 @@
+ }
+ }
+
+- static String getSystemProperty(final String name) {
+- return (String)AccessController.doPrivileged(new PrivilegedAction() {
+- public Object run() {
+- return System.getProperty(name);
+- }
+- });
+- }
+-
+ public PrintJob getPrintJob(final Frame frame, final String doctitle,
+ final Properties props) {
+
+@@ -1894,16 +1886,7 @@
+ }
+
+ static void removeSourceEvents(EventQueue queue, Object source, boolean removeAllEvents) {
+- try {
+- m_removeSourceEvents.invoke(queue, source, removeAllEvents);
+- }
+- catch (IllegalAccessException e)
+- {
+- e.printStackTrace();
+- }
+- catch (InvocationTargetException e) {
+- e.printStackTrace();
+- }
++ AWTAccessor.getEventQueueAccessor().removeSourceEvents(queue, source, removeAllEvents);
+ }
+
+ public boolean isAlwaysOnTopSupported() {
+@@ -1937,8 +1920,8 @@
+ }
+
+ private static void setBackingStoreType() {
+- String prop = (String)AccessController.doPrivileged(
+- new sun.security.action.GetPropertyAction("sun.awt.backingStore"));
++ String prop = AccessController.doPrivileged(
++ new GetPropertyAction("sun.awt.backingStore"));
+
+ if (prop == null) {
+ backingStoreType = XConstants.NotUseful;
+--- jdk/src/solaris/classes/sun/awt/X11/XWindow.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XWindow.java 2012-09-05 19:35:40.000000000 -0400
+@@ -33,7 +33,6 @@
+ import java.lang.ref.WeakReference;
+
+ import java.lang.reflect.Field;
+-import java.lang.reflect.Method;
+
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+@@ -108,7 +107,6 @@
+ native void getWindowBounds(long window, long x, long y, long width, long height);
+ private native static void initIDs();
+
+- private static Field isPostedField;
+ static {
+ initIDs();
+ }
+@@ -361,20 +359,10 @@
+ return false;
+ }
+
+- static Method m_sendMessage;
+ static void sendEvent(final AWTEvent e) {
+- if (isPostedField == null) {
+- isPostedField = SunToolkit.getField(AWTEvent.class, "isPosted");
+- }
+ PeerEvent pe = new PeerEvent(Toolkit.getDefaultToolkit(), new Runnable() {
+ public void run() {
+- try {
+- isPostedField.setBoolean(e, true);
+- } catch (IllegalArgumentException e) {
+- assert(false);
+- } catch (IllegalAccessException e) {
+- assert(false);
+- }
++ AWTAccessor.getAWTEventAccessor().setPosted(e);
+ ((Component)e.getSource()).dispatchEvent(e);
+ }
+ }, PeerEvent.ULTIMATE_PRIORITY_EVENT);
+@@ -1250,16 +1238,8 @@
+ }
+
+
+- static Field bdata;
+ static void setBData(KeyEvent e, byte[] data) {
+- try {
+- if (bdata == null) {
+- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata");
+- }
+- bdata.set(e, data);
+- } catch (IllegalAccessException ex) {
+- assert false;
+- }
++ AWTAccessor.getAWTEventAccessor().setBData(e, data);
+ }
+
+ public void postKeyEvent(int id, long when, int keyCode, char keyChar,
+--- jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java 2012-05-01 17:18:34.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java 2012-09-05 19:35:40.000000000 -0400
+@@ -26,7 +26,7 @@
+ package sun.awt.X11;
+
+ import java.security.AccessController;
+-import java.security.PrivilegedAction;
++import sun.security.action.GetPropertyAction;
+ import sun.misc.*;
+
+ public class XlibWrapper implements XConstants, XUtilConstants, XProtocolConstants,
+@@ -562,12 +562,7 @@
+ static final boolean isBuildInternal;
+
+ static {
+- String dataModelProp = (String)AccessController.doPrivileged(
+- new PrivilegedAction() {
+- public Object run() {
+- return System.getProperty("sun.arch.data.model");
+- }
+- });
++ String dataModelProp = AccessController.doPrivileged(new GetPropertyAction("sun.arch.data.model"));
+ try {
+ dataModel = Integer.parseInt(dataModelProp);
+ } catch (Exception e) {
+@@ -610,7 +605,7 @@
+ }
+
+ private static boolean getBuildInternal() {
+- String javaVersion = XToolkit.getSystemProperty("java.version");
++ String javaVersion = AccessController.doPrivileged(new GetPropertyAction("java.version"));
+ return javaVersion != null && javaVersion.contains("internal");
+ }
+
+--- jdk/src/solaris/classes/sun/awt/motif/MComponentPeer.java 2012-05-01 17:18:35.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/motif/MComponentPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -400,16 +400,7 @@
+ static Method requestFocusWithCause;
+
+ static void callRequestFocusInWindow(Component target, CausedFocusEvent.Cause cause) {
+- if (requestFocusWithCause == null) {
+- requestFocusWithCause = SunToolkit.getMethod(Component.class, "requestFocusInWindow", new Class[] {CausedFocusEvent.Cause.class});
+- }
+- if (requestFocusWithCause != null) {
+- try {
+- requestFocusWithCause.invoke(target, new Object[] {cause});
+- } catch (Exception e) {
+- e.printStackTrace();
+- }
+- }
++ AWTAccessor.getComponentAccessor().requestFocusInWindow(target, cause);
+ }
+
+ public void handleEvent(AWTEvent e) {
+--- jdk/src/solaris/classes/sun/print/UnixPrintJob.java 2012-05-01 17:18:35.000000000 -0400
++++ jdk/src/solaris/classes/sun/print/UnixPrintJob.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
@@ -1983,8 +6737,8 @@
spoolFile.deleteOnExit();
}
result = new FileOutputStream(spoolFile);
---- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java.orig 2012-05-01 17:18:35.000000000 -0400
-+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-05-01 17:18:35.000000000 -0400
++++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -2001,8 +6755,8 @@
cmd[2] = cmd[2]+">"+f.getAbsolutePath();
proc = Runtime.getRuntime().exec(cmd);
---- jdk/src/solaris/native/java/io/UnixFileSystem_md.c.orig 2012-05-01 17:18:35.000000000 -0400
-+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-05-01 17:18:35.000000000 -0400
++++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -2030,8 +6784,8 @@
}
if (fd < 0) {
if (fd != JVM_EEXIST) {
---- jdk/src/windows/classes/java/io/Win32FileSystem.java.orig 2012-05-01 17:18:37.000000000 -0400
-+++ jdk/src/windows/classes/java/io/Win32FileSystem.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/windows/classes/java/io/Win32FileSystem.java 2012-05-01 17:18:37.000000000 -0400
++++ jdk/src/windows/classes/java/io/Win32FileSystem.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
@@ -2048,8 +6802,8 @@
throws IOException;
public boolean delete(File f) {
// Keep canonicalization caches in sync after file deletion
---- jdk/src/windows/classes/java/io/WinNTFileSystem.java.orig 2012-05-01 17:18:37.000000000 -0400
-+++ jdk/src/windows/classes/java/io/WinNTFileSystem.java 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/windows/classes/java/io/WinNTFileSystem.java 2012-05-01 17:18:37.000000000 -0400
++++ jdk/src/windows/classes/java/io/WinNTFileSystem.java 2012-09-05 19:34:26.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -2066,8 +6820,53 @@
throws IOException;
protected native boolean delete0(File f);
public native String[] list(File f);
---- jdk/src/windows/native/java/io/Win32FileSystem_md.c.orig 2012-05-01 17:18:37.000000000 -0400
-+++ jdk/src/windows/native/java/io/Win32FileSystem_md.c 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java 2012-05-01 17:18:37.000000000 -0400
++++ jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java 2012-09-05 19:35:40.000000000 -0400
+@@ -26,36 +26,23 @@
+
+ import java.awt.*;
+ import java.awt.peer.*;
+-import java.lang.reflect.Field;
+
+-import sun.awt.SunToolkit;
++import sun.awt.AWTAccessor;
+
+ public class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
+ // We can't use target.getParent() for TrayIcon popup
+ // because this method should return null for the TrayIcon
+ // popup regardless of that whether it has parent or not.
+- private static Field f_parent;
+- private static Field f_isTrayIconPopup;
+-
+- static {
+- f_parent = SunToolkit.getField(MenuComponent.class, "parent");
+- f_isTrayIconPopup = SunToolkit.getField(PopupMenu.class, "isTrayIconPopup");
+- }
+
+ public WPopupMenuPeer(PopupMenu target) {
+ this.target = target;
+ MenuContainer parent = null;
+ boolean isTrayIconPopup = false;
+- try {
+- isTrayIconPopup = ((Boolean)f_isTrayIconPopup.get(target)).booleanValue();
+- if (isTrayIconPopup) {
+- parent = (MenuContainer)f_parent.get(target);
+- } else {
+- parent = target.getParent();
+- }
+- } catch (IllegalAccessException iae) {
+- iae.printStackTrace();
+- return;
++ isTrayIconPopup = AWTAccessor.getPopupMenuAccessor().isTrayIconPopup(target);
++ if (isTrayIconPopup) {
++ parent = AWTAccessor.getMenuComponentAccessor().getParent(target);
++ } else {
++ parent = target.getParent();
+ }
+
+ if (parent instanceof Component) {
+--- jdk/src/windows/native/java/io/Win32FileSystem_md.c 2012-05-01 17:18:37.000000000 -0400
++++ jdk/src/windows/native/java/io/Win32FileSystem_md.c 2012-09-05 19:34:27.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -2085,8 +6884,8 @@
{
jboolean rv = JNI_FALSE;
DWORD a;
---- jdk/src/windows/native/java/io/WinNTFileSystem_md.c.orig 2012-05-01 17:18:37.000000000 -0400
-+++ jdk/src/windows/native/java/io/WinNTFileSystem_md.c 2012-06-13 12:53:06.000000000 -0400
+--- jdk/src/windows/native/java/io/WinNTFileSystem_md.c 2012-05-01 17:18:37.000000000 -0400
++++ jdk/src/windows/native/java/io/WinNTFileSystem_md.c 2012-09-05 19:34:27.000000000 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.