Date: Fri, 7 Sep 2012 19:27:31 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r303821 - in head/java/openjdk6: . files Message-ID: <201209071927.q87JRVHP051087@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Fri Sep 7 19:27:31 2012 New Revision: 303821 URL: http://svn.freebsd.org/changeset/ports/303821 Log: - Update security patch to fix CVE-2012-0547 and CVE-2012-1682. - Catch up with icedtea.classpath.org server changes for distfiles. Modified: head/java/openjdk6/Makefile head/java/openjdk6/files/patch-security Modified: head/java/openjdk6/Makefile ============================================================================== --- head/java/openjdk6/Makefile Fri Sep 7 18:59:28 2012 (r303820) +++ head/java/openjdk6/Makefile Fri Sep 7 19:27:31 2012 (r303821) @@ -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} Modified: head/java/openjdk6/files/patch-security ============================================================================== --- head/java/openjdk6/files/patch-security Fri Sep 7 18:59:28 2012 (r303820) +++ head/java/openjdk6/files/patch-security Fri Sep 7 19:27:31 2012 (r303821) @@ -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. *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209071927.q87JRVHP051087>