You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(97) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(127) |
Feb
(34) |
Mar
(16) |
Apr
(26) |
May
(55) |
Jun
(107) |
Jul
(36) |
Aug
(72) |
Sep
(90) |
Oct
(41) |
Nov
(27) |
Dec
(13) |
2008 |
Jan
(37) |
Feb
(39) |
Mar
(98) |
Apr
(115) |
May
(134) |
Jun
(120) |
Jul
(86) |
Aug
(149) |
Sep
(68) |
Oct
(66) |
Nov
(104) |
Dec
(49) |
2009 |
Jan
(131) |
Feb
(132) |
Mar
(125) |
Apr
(172) |
May
(161) |
Jun
(43) |
Jul
(47) |
Aug
(38) |
Sep
(18) |
Oct
(6) |
Nov
(1) |
Dec
(15) |
2010 |
Jan
(21) |
Feb
(8) |
Mar
(10) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(4) |
2011 |
Jan
(23) |
Feb
(10) |
Mar
(13) |
Apr
(3) |
May
|
Jun
(19) |
Jul
(11) |
Aug
(22) |
Sep
|
Oct
(4) |
Nov
(2) |
Dec
(12) |
2012 |
Jan
(3) |
Feb
(4) |
Mar
(7) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(30) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(8) |
2013 |
Jan
(3) |
Feb
(40) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
|
2
|
3
|
4
|
5
(9) |
6
(4) |
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
|
From: <ls...@us...> - 2011-03-06 21:00:22
|
Revision: 5808 http://jnode.svn.sourceforge.net/jnode/?rev=5808&view=rev Author: lsantha Date: 2011-03-06 21:00:15 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Following up class library changes. Modified Paths: -------------- trunk/all/conf/core-classes.txt trunk/core/descriptors/org.classpath.core.xml Modified: trunk/all/conf/core-classes.txt =================================================================== --- trunk/all/conf/core-classes.txt 2011-03-06 20:51:14 UTC (rev 5807) +++ trunk/all/conf/core-classes.txt 2011-03-06 21:00:15 UTC (rev 5808) @@ -116,6 +116,7 @@ //sun.reflect.generics.visitor //sun.reflect.misc sun.misc.VM +sun.net.ApplicationProxy sun.nio sun.nio.cs.US_ASCII sun.nio.cs.ISO_8859_1* Modified: trunk/core/descriptors/org.classpath.core.xml =================================================================== --- trunk/core/descriptors/org.classpath.core.xml 2011-03-06 20:51:14 UTC (rev 5807) +++ trunk/core/descriptors/org.classpath.core.xml 2011-03-06 21:00:15 UTC (rev 5808) @@ -53,6 +53,7 @@ <export name="sun.misc.ServiceConfigurationError"/> <export name="sun.misc.VM"/> + <export name="sun.net.ApplicationProxy*"/> <export name="sun.nio.cs.*"/> <export name="sun.text.*"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2011-03-06 20:51:24
|
Revision: 5807 http://jnode.svn.sourceforge.net/jnode/?rev=5807&view=rev Author: lsantha Date: 2011-03-06 20:51:14 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/java/java/lang/AbstractMethodError.java classlib6/core/src/openjdk/java/java/lang/AbstractStringBuilder.java classlib6/core/src/openjdk/java/java/lang/Appendable.java classlib6/core/src/openjdk/java/java/lang/ArithmeticException.java classlib6/core/src/openjdk/java/java/lang/ArrayIndexOutOfBoundsException.java classlib6/core/src/openjdk/java/java/lang/ArrayStoreException.java classlib6/core/src/openjdk/java/java/lang/AssertionError.java classlib6/core/src/openjdk/java/java/lang/AssertionStatusDirectives.java classlib6/core/src/openjdk/java/java/lang/Boolean.java classlib6/core/src/openjdk/java/java/lang/Byte.java classlib6/core/src/openjdk/java/java/lang/CharSequence.java classlib6/core/src/openjdk/java/java/lang/Character.java classlib6/core/src/openjdk/java/java/lang/CharacterData.java classlib6/core/src/openjdk/java/java/lang/Class.java classlib6/core/src/openjdk/java/java/lang/ClassCastException.java classlib6/core/src/openjdk/java/java/lang/ClassFormatError.java classlib6/core/src/openjdk/java/java/lang/ClassNotFoundException.java classlib6/core/src/openjdk/java/java/lang/CloneNotSupportedException.java classlib6/core/src/openjdk/java/java/lang/Cloneable.java classlib6/core/src/openjdk/java/java/lang/Comparable.java classlib6/core/src/openjdk/java/java/lang/ConditionalSpecialCasing.java classlib6/core/src/openjdk/java/java/lang/Deprecated.java classlib6/core/src/openjdk/java/java/lang/Double.java classlib6/core/src/openjdk/java/java/lang/Enum.java classlib6/core/src/openjdk/java/java/lang/EnumConstantNotPresentException.java classlib6/core/src/openjdk/java/java/lang/Error.java classlib6/core/src/openjdk/java/java/lang/Exception.java classlib6/core/src/openjdk/java/java/lang/ExceptionInInitializerError.java classlib6/core/src/openjdk/java/java/lang/Float.java classlib6/core/src/openjdk/java/java/lang/IllegalAccessError.java classlib6/core/src/openjdk/java/java/lang/IllegalAccessException.java classlib6/core/src/openjdk/java/java/lang/IllegalArgumentException.java classlib6/core/src/openjdk/java/java/lang/IllegalMonitorStateException.java classlib6/core/src/openjdk/java/java/lang/IllegalStateException.java classlib6/core/src/openjdk/java/java/lang/IllegalThreadStateException.java classlib6/core/src/openjdk/java/java/lang/IncompatibleClassChangeError.java classlib6/core/src/openjdk/java/java/lang/IndexOutOfBoundsException.java classlib6/core/src/openjdk/java/java/lang/InheritableThreadLocal.java classlib6/core/src/openjdk/java/java/lang/InstantiationError.java classlib6/core/src/openjdk/java/java/lang/InstantiationException.java classlib6/core/src/openjdk/java/java/lang/Integer.java classlib6/core/src/openjdk/java/java/lang/InternalError.java classlib6/core/src/openjdk/java/java/lang/InterruptedException.java classlib6/core/src/openjdk/java/java/lang/Iterable.java classlib6/core/src/openjdk/java/java/lang/LinkageError.java classlib6/core/src/openjdk/java/java/lang/Long.java classlib6/core/src/openjdk/java/java/lang/Math.java classlib6/core/src/openjdk/java/java/lang/NegativeArraySizeException.java classlib6/core/src/openjdk/java/java/lang/NoClassDefFoundError.java classlib6/core/src/openjdk/java/java/lang/NoSuchFieldError.java classlib6/core/src/openjdk/java/java/lang/NoSuchFieldException.java classlib6/core/src/openjdk/java/java/lang/NoSuchMethodError.java classlib6/core/src/openjdk/java/java/lang/NoSuchMethodException.java classlib6/core/src/openjdk/java/java/lang/NullPointerException.java classlib6/core/src/openjdk/java/java/lang/Number.java classlib6/core/src/openjdk/java/java/lang/NumberFormatException.java classlib6/core/src/openjdk/java/java/lang/Object.java classlib6/core/src/openjdk/java/java/lang/OutOfMemoryError.java classlib6/core/src/openjdk/java/java/lang/Override.java classlib6/core/src/openjdk/java/java/lang/Package.java classlib6/core/src/openjdk/java/java/lang/ProcessBuilder.java classlib6/core/src/openjdk/java/java/lang/Readable.java classlib6/core/src/openjdk/java/java/lang/Runnable.java classlib6/core/src/openjdk/java/java/lang/RuntimeException.java classlib6/core/src/openjdk/java/java/lang/RuntimePermission.java classlib6/core/src/openjdk/java/java/lang/SecurityException.java classlib6/core/src/openjdk/java/java/lang/Short.java classlib6/core/src/openjdk/java/java/lang/Shutdown.java classlib6/core/src/openjdk/java/java/lang/StackOverflowError.java classlib6/core/src/openjdk/java/java/lang/StackTraceElement.java classlib6/core/src/openjdk/java/java/lang/StrictMath.java classlib6/core/src/openjdk/java/java/lang/String.java classlib6/core/src/openjdk/java/java/lang/StringBuffer.java classlib6/core/src/openjdk/java/java/lang/StringBuilder.java classlib6/core/src/openjdk/java/java/lang/StringCoding.java classlib6/core/src/openjdk/java/java/lang/StringIndexOutOfBoundsException.java classlib6/core/src/openjdk/java/java/lang/SuppressWarnings.java classlib6/core/src/openjdk/java/java/lang/System.java classlib6/core/src/openjdk/java/java/lang/ThreadGroup.java classlib6/core/src/openjdk/java/java/lang/ThreadLocal.java classlib6/core/src/openjdk/java/java/lang/Throwable.java classlib6/core/src/openjdk/java/java/lang/TypeNotPresentException.java classlib6/core/src/openjdk/java/java/lang/UnknownError.java classlib6/core/src/openjdk/java/java/lang/UnsatisfiedLinkError.java classlib6/core/src/openjdk/java/java/lang/UnsupportedClassVersionError.java classlib6/core/src/openjdk/java/java/lang/UnsupportedOperationException.java classlib6/core/src/openjdk/java/java/lang/VerifyError.java classlib6/core/src/openjdk/java/java/lang/VirtualMachineError.java classlib6/core/src/openjdk/java/java/lang/Void.java classlib6/core/src/openjdk/java/java/lang/package-info.java classlib6/core/src/openjdk/java/java/lang/reflect/AccessibleObject.java classlib6/core/src/openjdk/java/java/lang/reflect/AnnotatedElement.java classlib6/core/src/openjdk/java/java/lang/reflect/Array.java classlib6/core/src/openjdk/java/java/lang/reflect/Constructor.java classlib6/core/src/openjdk/java/java/lang/reflect/Field.java classlib6/core/src/openjdk/java/java/lang/reflect/GenericArrayType.java classlib6/core/src/openjdk/java/java/lang/reflect/GenericDeclaration.java classlib6/core/src/openjdk/java/java/lang/reflect/GenericSignatureFormatError.java classlib6/core/src/openjdk/java/java/lang/reflect/InvocationHandler.java classlib6/core/src/openjdk/java/java/lang/reflect/InvocationTargetException.java classlib6/core/src/openjdk/java/java/lang/reflect/MalformedParameterizedTypeException.java classlib6/core/src/openjdk/java/java/lang/reflect/Member.java classlib6/core/src/openjdk/java/java/lang/reflect/Method.java classlib6/core/src/openjdk/java/java/lang/reflect/Modifier.java classlib6/core/src/openjdk/java/java/lang/reflect/ParameterizedType.java classlib6/core/src/openjdk/java/java/lang/reflect/Proxy.java classlib6/core/src/openjdk/java/java/lang/reflect/ReflectAccess.java classlib6/core/src/openjdk/java/java/lang/reflect/ReflectPermission.java classlib6/core/src/openjdk/java/java/lang/reflect/Type.java classlib6/core/src/openjdk/java/java/lang/reflect/TypeVariable.java classlib6/core/src/openjdk/java/java/lang/reflect/UndeclaredThrowableException.java classlib6/core/src/openjdk/java/java/lang/reflect/WildcardType.java classlib6/core/src/openjdk/java/java/lang/reflect/package-info.java classlib6/core/src/openjdk/java/java/net/AbstractPlainDatagramSocketImpl.java classlib6/core/src/openjdk/java/java/net/AbstractPlainSocketImpl.java classlib6/core/src/openjdk/java/java/net/Authenticator.java classlib6/core/src/openjdk/java/java/net/BindException.java classlib6/core/src/openjdk/java/java/net/CacheRequest.java classlib6/core/src/openjdk/java/java/net/CacheResponse.java classlib6/core/src/openjdk/java/java/net/ConnectException.java classlib6/core/src/openjdk/java/java/net/ContentHandlerFactory.java classlib6/core/src/openjdk/java/java/net/CookieHandler.java classlib6/core/src/openjdk/java/java/net/DatagramSocket.java classlib6/core/src/openjdk/java/java/net/DatagramSocketImpl.java classlib6/core/src/openjdk/java/java/net/DatagramSocketImplFactory.java classlib6/core/src/openjdk/java/java/net/FileNameMap.java classlib6/core/src/openjdk/java/java/net/HttpRetryException.java classlib6/core/src/openjdk/java/java/net/HttpURLConnection.java classlib6/core/src/openjdk/java/java/net/Inet4Address.java classlib6/core/src/openjdk/java/java/net/Inet4AddressImpl.java classlib6/core/src/openjdk/java/java/net/Inet6Address.java classlib6/core/src/openjdk/java/java/net/Inet6AddressImpl.java classlib6/core/src/openjdk/java/java/net/InetAddress.java classlib6/core/src/openjdk/java/java/net/InetAddressImpl.java classlib6/core/src/openjdk/java/java/net/InetSocketAddress.java classlib6/core/src/openjdk/java/java/net/JarURLConnection.java classlib6/core/src/openjdk/java/java/net/MalformedURLException.java classlib6/core/src/openjdk/java/java/net/MulticastSocket.java classlib6/core/src/openjdk/java/java/net/NetPermission.java classlib6/core/src/openjdk/java/java/net/NetworkInterface.java classlib6/core/src/openjdk/java/java/net/NoRouteToHostException.java classlib6/core/src/openjdk/java/java/net/PasswordAuthentication.java classlib6/core/src/openjdk/java/java/net/PortUnreachableException.java classlib6/core/src/openjdk/java/java/net/ProtocolException.java classlib6/core/src/openjdk/java/java/net/Proxy.java classlib6/core/src/openjdk/java/java/net/ProxySelector.java classlib6/core/src/openjdk/java/java/net/ResponseCache.java classlib6/core/src/openjdk/java/java/net/SecureCacheResponse.java classlib6/core/src/openjdk/java/java/net/Socket.java classlib6/core/src/openjdk/java/java/net/SocketAddress.java classlib6/core/src/openjdk/java/java/net/SocketImplFactory.java classlib6/core/src/openjdk/java/java/net/SocketOptions.java classlib6/core/src/openjdk/java/java/net/SocketPermission.java classlib6/core/src/openjdk/java/java/net/SocketTimeoutException.java classlib6/core/src/openjdk/java/java/net/SocksConsts.java classlib6/core/src/openjdk/java/java/net/SocksSocketImpl.java classlib6/core/src/openjdk/java/java/net/URI.java classlib6/core/src/openjdk/java/java/net/URISyntaxException.java classlib6/core/src/openjdk/java/java/net/URL.java classlib6/core/src/openjdk/java/java/net/URLClassLoader.java classlib6/core/src/openjdk/java/java/net/URLDecoder.java classlib6/core/src/openjdk/java/java/net/URLStreamHandlerFactory.java classlib6/core/src/openjdk/java/java/net/UnknownHostException.java classlib6/core/src/openjdk/java/java/net/UnknownServiceException.java classlib6/core/src/openjdk/java/java/net/package.html Added Paths: ----------- classlib6/core/src/openjdk/sun/sun/net/ApplicationProxy.java classlib6/core/src/openjdk/sun/sun/net/ResourceManager.java Modified: classlib6/core/src/openjdk/java/java/lang/AbstractMethodError.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/AbstractMethodError.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/AbstractMethodError.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/AbstractStringBuilder.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/AbstractStringBuilder.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/AbstractStringBuilder.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Appendable.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Appendable.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Appendable.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ArithmeticException.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ArithmeticException.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ArithmeticException.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ArrayIndexOutOfBoundsException.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ArrayIndexOutOfBoundsException.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ArrayIndexOutOfBoundsException.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ArrayStoreException.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ArrayStoreException.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ArrayStoreException.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/AssertionError.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/AssertionError.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/AssertionError.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/AssertionStatusDirectives.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/AssertionStatusDirectives.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/AssertionStatusDirectives.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Boolean.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Boolean.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Boolean.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Byte.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Byte.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Byte.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/CharSequence.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/CharSequence.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/CharSequence.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Character.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Character.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Character.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2002, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/CharacterData.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/CharacterData.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/CharacterData.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Class.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Class.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Class.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ClassCastException.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ClassCastException.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ClassCastException.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ClassFormatError.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ClassFormatError.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ClassFormatError.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ClassNotFoundException.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ClassNotFoundException.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ClassNotFoundException.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/CloneNotSupportedException.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/CloneNotSupportedException.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/CloneNotSupportedException.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Cloneable.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Cloneable.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Cloneable.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Comparable.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Comparable.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Comparable.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ConditionalSpecialCasing.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ConditionalSpecialCasing.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ConditionalSpecialCasing.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Deprecated.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Deprecated.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Deprecated.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Double.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Double.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Double.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Enum.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Enum.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Enum.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/EnumConstantNotPresentException.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/EnumConstantNotPresentException.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/EnumConstantNotPresentException.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Error.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Error.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Error.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Exception.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Exception.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Exception.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/ExceptionInInitializerError.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/ExceptionInInitializerError.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/ExceptionInInitializerError.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.lang; Modified: classlib6/core/src/openjdk/java/java/lang/Float.java =================================================================== --- classlib6/core/src/openjdk/java/java/lang/Float.java 2011-03-06 19:17:58 UTC (rev 5806) +++ classlib6/core/src/openjdk/java/java/lang/Float.java 2011-03-06 20:51:14 UTC (rev 5807) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 2 along with this work; if not, write to the Free... [truncated message content] |
From: <ls...@us...> - 2011-03-06 19:18:08
|
Revision: 5806 http://jnode.svn.sourceforge.net/jnode/?rev=5806&view=rev Author: lsantha Date: 2011-03-06 19:17:58 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/java/java/io/Bits.java classlib6/core/src/openjdk/java/java/io/BufferedInputStream.java classlib6/core/src/openjdk/java/java/io/BufferedOutputStream.java classlib6/core/src/openjdk/java/java/io/BufferedReader.java classlib6/core/src/openjdk/java/java/io/BufferedWriter.java classlib6/core/src/openjdk/java/java/io/ByteArrayInputStream.java classlib6/core/src/openjdk/java/java/io/ByteArrayOutputStream.java classlib6/core/src/openjdk/java/java/io/CharArrayReader.java classlib6/core/src/openjdk/java/java/io/CharArrayWriter.java classlib6/core/src/openjdk/java/java/io/CharConversionException.java classlib6/core/src/openjdk/java/java/io/Closeable.java classlib6/core/src/openjdk/java/java/io/DataInputStream.java classlib6/core/src/openjdk/java/java/io/DataOutputStream.java classlib6/core/src/openjdk/java/java/io/DeleteOnExitHook.java classlib6/core/src/openjdk/java/java/io/EOFException.java classlib6/core/src/openjdk/java/java/io/ExpiringCache.java classlib6/core/src/openjdk/java/java/io/Externalizable.java classlib6/core/src/openjdk/java/java/io/File.java classlib6/core/src/openjdk/java/java/io/FileFilter.java classlib6/core/src/openjdk/java/java/io/FileNotFoundException.java classlib6/core/src/openjdk/java/java/io/FileReader.java classlib6/core/src/openjdk/java/java/io/FileSystem.java classlib6/core/src/openjdk/java/java/io/FileWriter.java classlib6/core/src/openjdk/java/java/io/FilenameFilter.java classlib6/core/src/openjdk/java/java/io/FilterInputStream.java classlib6/core/src/openjdk/java/java/io/FilterOutputStream.java classlib6/core/src/openjdk/java/java/io/FilterReader.java classlib6/core/src/openjdk/java/java/io/FilterWriter.java classlib6/core/src/openjdk/java/java/io/Flushable.java classlib6/core/src/openjdk/java/java/io/IOException.java classlib6/core/src/openjdk/java/java/io/InputStream.java classlib6/core/src/openjdk/java/java/io/InputStreamReader.java classlib6/core/src/openjdk/java/java/io/InterruptedIOException.java classlib6/core/src/openjdk/java/java/io/InvalidClassException.java classlib6/core/src/openjdk/java/java/io/InvalidObjectException.java classlib6/core/src/openjdk/java/java/io/LineNumberInputStream.java classlib6/core/src/openjdk/java/java/io/LineNumberReader.java classlib6/core/src/openjdk/java/java/io/NotActiveException.java classlib6/core/src/openjdk/java/java/io/NotSerializableException.java classlib6/core/src/openjdk/java/java/io/ObjectInput.java classlib6/core/src/openjdk/java/java/io/ObjectInputStream.java classlib6/core/src/openjdk/java/java/io/ObjectInputValidation.java classlib6/core/src/openjdk/java/java/io/ObjectOutput.java classlib6/core/src/openjdk/java/java/io/ObjectOutputStream.java classlib6/core/src/openjdk/java/java/io/ObjectStreamClass.java classlib6/core/src/openjdk/java/java/io/ObjectStreamConstants.java classlib6/core/src/openjdk/java/java/io/ObjectStreamException.java classlib6/core/src/openjdk/java/java/io/ObjectStreamField.java classlib6/core/src/openjdk/java/java/io/OptionalDataException.java classlib6/core/src/openjdk/java/java/io/OutputStream.java classlib6/core/src/openjdk/java/java/io/OutputStreamWriter.java classlib6/core/src/openjdk/java/java/io/PipedReader.java classlib6/core/src/openjdk/java/java/io/PipedWriter.java classlib6/core/src/openjdk/java/java/io/PrintStream.java classlib6/core/src/openjdk/java/java/io/PrintWriter.java classlib6/core/src/openjdk/java/java/io/PushbackInputStream.java classlib6/core/src/openjdk/java/java/io/PushbackReader.java classlib6/core/src/openjdk/java/java/io/Reader.java classlib6/core/src/openjdk/java/java/io/SequenceInputStream.java classlib6/core/src/openjdk/java/java/io/Serializable.java classlib6/core/src/openjdk/java/java/io/SerializablePermission.java classlib6/core/src/openjdk/java/java/io/StreamCorruptedException.java classlib6/core/src/openjdk/java/java/io/StreamTokenizer.java classlib6/core/src/openjdk/java/java/io/StringBufferInputStream.java classlib6/core/src/openjdk/java/java/io/StringReader.java classlib6/core/src/openjdk/java/java/io/StringWriter.java classlib6/core/src/openjdk/java/java/io/SyncFailedException.java classlib6/core/src/openjdk/java/java/io/UTFDataFormatException.java classlib6/core/src/openjdk/java/java/io/UnsupportedEncodingException.java classlib6/core/src/openjdk/java/java/io/WriteAbortedException.java classlib6/core/src/openjdk/java/java/io/Writer.java classlib6/core/src/openjdk/java/java/io/package.html Added Paths: ----------- classlib6/core/src/openjdk/java/java/io/SerialCallbackContext.java Modified: classlib6/core/src/openjdk/java/java/io/Bits.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/Bits.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/Bits.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2001, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/BufferedInputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/BufferedInputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/BufferedInputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,13 +18,12 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; -import java.security.PrivilegedAction; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; /** @@ -66,24 +65,11 @@ * of buf[] as primary indicator that this stream is closed. (The * "in" field is also nulled out on close.) */ - private static final AtomicReferenceFieldUpdater<BufferedInputStream, byte[]> bufUpdater; + private static final + AtomicReferenceFieldUpdater<BufferedInputStream, byte[]> bufUpdater = + AtomicReferenceFieldUpdater.newUpdater + (BufferedInputStream.class, byte[].class, "buf"); - //jnode - //todo: should be cleaned up (possible reason: bug in jnode security subsystem) - static { - bufUpdater = java.security.AccessController.doPrivileged( - new PrivilegedAction<AtomicReferenceFieldUpdater<BufferedInputStream, byte[]>>() { - @Override - public AtomicReferenceFieldUpdater<BufferedInputStream, byte[]> run() { - return createUpdater(); - } - }); - } - - private static final AtomicReferenceFieldUpdater<BufferedInputStream, byte[]> createUpdater() { - return AtomicReferenceFieldUpdater.newUpdater(BufferedInputStream.class, byte[].class, "buf"); - } - /** * The index one greater than the index of the last valid byte in * the buffer. Modified: classlib6/core/src/openjdk/java/java/io/BufferedOutputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/BufferedOutputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/BufferedOutputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/BufferedReader.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/BufferedReader.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/BufferedReader.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/BufferedWriter.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/BufferedWriter.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/BufferedWriter.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/ByteArrayInputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/ByteArrayInputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/ByteArrayInputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/ByteArrayOutputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/ByteArrayOutputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/ByteArrayOutputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/CharArrayReader.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/CharArrayReader.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/CharArrayReader.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/CharArrayWriter.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/CharArrayWriter.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/CharArrayWriter.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/CharConversionException.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/CharConversionException.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/CharConversionException.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/Closeable.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/Closeable.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/Closeable.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/DataInputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/DataInputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/DataInputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/DataOutputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/DataOutputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/DataOutputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/DeleteOnExitHook.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/DeleteOnExitHook.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/DeleteOnExitHook.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/EOFException.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/EOFException.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/EOFException.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/ExpiringCache.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/ExpiringCache.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/ExpiringCache.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2002, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ Modified: classlib6/core/src/openjdk/java/java/io/Externalizable.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/Externalizable.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/Externalizable.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/File.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/File.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/File.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; @@ -32,9 +32,9 @@ import java.util.ArrayList; import java.util.Map; import java.util.Hashtable; -import java.util.Random; import java.security.AccessController; import java.security.AccessControlException; +import java.security.SecureRandom; import sun.security.action.GetPropertyAction; @@ -1676,28 +1676,28 @@ /* -- Temporary files -- */ - private static final Object tmpFileLock = new Object(); + // lazy initialization of SecureRandom and temporary file directory + private static class LazyInitialization { + static final SecureRandom random = new SecureRandom(); - private static int counter = -1; /* Protected by tmpFileLock */ + static final String temporaryDirectory = temporaryDirectory(); + static String temporaryDirectory() { + return fs.normalize( + AccessController.doPrivileged( + new GetPropertyAction("java.io.tmpdir"))); + } + } private static File generateFile(String prefix, String suffix, File dir) throws IOException { - if (counter == -1) { - counter = new Random().nextInt() & 0xffff; - } - counter++; - return new File(dir, prefix + Integer.toString(counter) + suffix); + long n = LazyInitialization.random.nextLong(); + if (n == Long.MIN_VALUE) { + n = 0; // corner case + } else { + n = Math.abs(n); } - - private static String tmpdir; /* Protected by tmpFileLock */ - - private static String getTempDir() { - if (tmpdir == null) - tmpdir = fs.normalize( - AccessController.doPrivileged( - new GetPropertyAction("java.io.tmpdir"))); - return tmpdir; + return new File(dir, prefix + Long.toString(n) + suffix); } private static boolean checkAndCreate(String filename, SecurityManager sm) @@ -1793,9 +1793,8 @@ if (prefix.length() < 3) throw new IllegalArgumentException("Prefix string too short"); String s = (suffix == null) ? ".tmp" : suffix; - synchronized (tmpFileLock) { if (directory == null) { - String tmpDir = getTempDir(); + String tmpDir = LazyInitialization.temporaryDirectory(); directory = new File(tmpDir, fs.prefixLength(tmpDir)); } SecurityManager sm = System.getSecurityManager(); @@ -1805,7 +1804,6 @@ } while (!checkAndCreate(f.getPath(), sm)); return f; } - } /** * Creates an empty file in the default temporary-file directory, using @@ -1938,11 +1936,12 @@ private synchronized void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { - s.defaultReadObject(); + ObjectInputStream.GetField fields = s.readFields(); + String pathField = (String)fields.get("path", null); char sep = s.readChar(); // read the previous separator char if (sep != separatorChar) - this.path = this.path.replace(sep, separatorChar); - this.path = fs.normalize(this.path); + pathField = pathField.replace(sep, separatorChar); + this.path = fs.normalize(pathField); this.prefixLength = fs.prefixLength(this.path); } Modified: classlib6/core/src/openjdk/java/java/io/FileFilter.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FileFilter.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FileFilter.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FileNotFoundException.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FileNotFoundException.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FileNotFoundException.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FileReader.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FileReader.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FileReader.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 2001, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FileSystem.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FileSystem.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FileSystem.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FileWriter.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FileWriter.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FileWriter.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 2001, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FilenameFilter.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FilenameFilter.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FilenameFilter.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-1998 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FilterInputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FilterInputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FilterInputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FilterOutputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FilterOutputStream.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FilterOutputStream.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FilterReader.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FilterReader.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FilterReader.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/FilterWriter.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/FilterWriter.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/FilterWriter.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/Flushable.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/Flushable.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/Flushable.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.io; Modified: classlib6/core/src/openjdk/java/java/io/IOException.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/IOException.java 2011-03-06 18:55:51 UTC (rev 5805) +++ classlib6/core/src/openjdk/java/java/io/IOException.java 2011-03-06 19:17:58 UTC (rev 5806) @@ -1,12 +1,12 @@ /* - * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1994, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. *... [truncated message content] |
From: <ls...@us...> - 2011-03-06 18:56:01
|
Revision: 5805 http://jnode.svn.sourceforge.net/jnode/?rev=5805&view=rev Author: lsantha Date: 2011-03-06 18:55:51 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/java/java/awt/AWTError.java classlib6/core/src/openjdk/java/java/awt/AWTEvent.java classlib6/core/src/openjdk/java/java/awt/AWTEventMulticaster.java classlib6/core/src/openjdk/java/java/awt/AWTException.java classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java classlib6/core/src/openjdk/java/java/awt/AWTPermission.java classlib6/core/src/openjdk/java/java/awt/ActiveEvent.java classlib6/core/src/openjdk/java/java/awt/Adjustable.java classlib6/core/src/openjdk/java/java/awt/AttributeValue.java classlib6/core/src/openjdk/java/java/awt/BufferCapabilities.java classlib6/core/src/openjdk/java/java/awt/CheckboxGroup.java classlib6/core/src/openjdk/java/java/awt/Color.java classlib6/core/src/openjdk/java/java/awt/Component.java classlib6/core/src/openjdk/java/java/awt/ComponentOrientation.java classlib6/core/src/openjdk/java/java/awt/Composite.java classlib6/core/src/openjdk/java/java/awt/CompositeContext.java classlib6/core/src/openjdk/java/java/awt/Conditional.java classlib6/core/src/openjdk/java/java/awt/ContainerOrderFocusTraversalPolicy.java classlib6/core/src/openjdk/java/java/awt/DefaultFocusTraversalPolicy.java classlib6/core/src/openjdk/java/java/awt/DefaultKeyboardFocusManager.java classlib6/core/src/openjdk/java/java/awt/DisplayMode.java classlib6/core/src/openjdk/java/java/awt/Event.java classlib6/core/src/openjdk/java/java/awt/EventDispatchThread.java classlib6/core/src/openjdk/java/java/awt/EventQueue.java classlib6/core/src/openjdk/java/java/awt/FocusTraversalPolicy.java classlib6/core/src/openjdk/java/java/awt/FontFormatException.java classlib6/core/src/openjdk/java/java/awt/FontMetrics.java classlib6/core/src/openjdk/java/java/awt/GradientPaint.java classlib6/core/src/openjdk/java/java/awt/GradientPaintContext.java classlib6/core/src/openjdk/java/java/awt/Graphics2D.java classlib6/core/src/openjdk/java/java/awt/GraphicsCallback.java classlib6/core/src/openjdk/java/java/awt/GraphicsConfigTemplate.java classlib6/core/src/openjdk/java/java/awt/GraphicsConfiguration.java classlib6/core/src/openjdk/java/java/awt/GraphicsDevice.java classlib6/core/src/openjdk/java/java/awt/GraphicsEnvironment.java classlib6/core/src/openjdk/java/java/awt/GridBagLayoutInfo.java classlib6/core/src/openjdk/java/java/awt/HeadlessException.java classlib6/core/src/openjdk/java/java/awt/IllegalComponentStateException.java classlib6/core/src/openjdk/java/java/awt/ImageCapabilities.java classlib6/core/src/openjdk/java/java/awt/Insets.java classlib6/core/src/openjdk/java/java/awt/ItemSelectable.java classlib6/core/src/openjdk/java/java/awt/JobAttributes.java classlib6/core/src/openjdk/java/java/awt/KeyEventDispatcher.java classlib6/core/src/openjdk/java/java/awt/KeyEventPostProcessor.java classlib6/core/src/openjdk/java/java/awt/KeyboardFocusManager.java classlib6/core/src/openjdk/java/java/awt/LayoutManager.java classlib6/core/src/openjdk/java/java/awt/LayoutManager2.java classlib6/core/src/openjdk/java/java/awt/LinearGradientPaint.java classlib6/core/src/openjdk/java/java/awt/LinearGradientPaintContext.java classlib6/core/src/openjdk/java/java/awt/MenuComponent.java classlib6/core/src/openjdk/java/java/awt/MenuContainer.java classlib6/core/src/openjdk/java/java/awt/MenuShortcut.java classlib6/core/src/openjdk/java/java/awt/MouseInfo.java classlib6/core/src/openjdk/java/java/awt/MultipleGradientPaint.java classlib6/core/src/openjdk/java/java/awt/MultipleGradientPaintContext.java classlib6/core/src/openjdk/java/java/awt/PageAttributes.java classlib6/core/src/openjdk/java/java/awt/Paint.java classlib6/core/src/openjdk/java/java/awt/PaintContext.java classlib6/core/src/openjdk/java/java/awt/PointerInfo.java classlib6/core/src/openjdk/java/java/awt/PopupMenu.java classlib6/core/src/openjdk/java/java/awt/PrintGraphics.java classlib6/core/src/openjdk/java/java/awt/PrintJob.java classlib6/core/src/openjdk/java/java/awt/RadialGradientPaint.java classlib6/core/src/openjdk/java/java/awt/RadialGradientPaintContext.java classlib6/core/src/openjdk/java/java/awt/RenderingHints.java classlib6/core/src/openjdk/java/java/awt/ScrollPane.java classlib6/core/src/openjdk/java/java/awt/ScrollPaneAdjustable.java classlib6/core/src/openjdk/java/java/awt/SentEvent.java classlib6/core/src/openjdk/java/java/awt/SequencedEvent.java classlib6/core/src/openjdk/java/java/awt/Shape.java classlib6/core/src/openjdk/java/java/awt/SplashScreen.java classlib6/core/src/openjdk/java/java/awt/Stroke.java classlib6/core/src/openjdk/java/java/awt/SystemColor.java classlib6/core/src/openjdk/java/java/awt/SystemTray.java classlib6/core/src/openjdk/java/java/awt/Transparency.java classlib6/core/src/openjdk/java/java/awt/TrayIcon.java classlib6/core/src/openjdk/java/java/awt/package.html classlib6/core/src/openjdk/sun/sun/applet/AppletAudioClip.java classlib6/core/src/openjdk/sun/sun/applet/AppletClassLoader.java classlib6/core/src/openjdk/sun/sun/applet/AppletEvent.java classlib6/core/src/openjdk/sun/sun/applet/AppletEventMulticaster.java classlib6/core/src/openjdk/sun/sun/applet/AppletIOException.java classlib6/core/src/openjdk/sun/sun/applet/AppletIllegalArgumentException.java classlib6/core/src/openjdk/sun/sun/applet/AppletImageRef.java classlib6/core/src/openjdk/sun/sun/applet/AppletListener.java classlib6/core/src/openjdk/sun/sun/applet/AppletMessageHandler.java classlib6/core/src/openjdk/sun/sun/applet/AppletObjectInputStream.java classlib6/core/src/openjdk/sun/sun/applet/AppletProps.java classlib6/core/src/openjdk/sun/sun/applet/AppletResourceLoader.java classlib6/core/src/openjdk/sun/sun/applet/AppletSecurityException.java classlib6/core/src/openjdk/sun/sun/applet/AppletThreadGroup.java classlib6/core/src/openjdk/sun/sun/applet/AppletViewer.java classlib6/core/src/openjdk/sun/sun/applet/AppletViewerFactory.java classlib6/core/src/openjdk/sun/sun/applet/AppletViewerPanel.java classlib6/core/src/openjdk/sun/sun/applet/Main.java classlib6/core/src/openjdk/sun/sun/awt/AWTAutoShutdown.java classlib6/core/src/openjdk/sun/sun/awt/AWTSecurityManager.java classlib6/core/src/openjdk/sun/sun/awt/AppContext.java classlib6/core/src/openjdk/sun/sun/awt/CausedFocusEvent.java classlib6/core/src/openjdk/sun/sun/awt/CharsetString.java classlib6/core/src/openjdk/sun/sun/awt/ComponentAccessor.java classlib6/core/src/openjdk/sun/sun/awt/ComponentFactory.java classlib6/core/src/openjdk/sun/sun/awt/ConstrainableGraphics.java classlib6/core/src/openjdk/sun/sun/awt/CustomCursor.java classlib6/core/src/openjdk/sun/sun/awt/DebugSettings.java classlib6/core/src/openjdk/sun/sun/awt/DefaultMouseInfoPeer.java classlib6/core/src/openjdk/sun/sun/awt/DesktopBrowse.java classlib6/core/src/openjdk/sun/sun/awt/DisplayChangedListener.java classlib6/core/src/openjdk/sun/sun/awt/EmbeddedFrame.java classlib6/core/src/openjdk/sun/sun/awt/EventListenerAggregate.java classlib6/core/src/openjdk/sun/sun/awt/FocusingTextField.java classlib6/core/src/openjdk/sun/sun/awt/FontConfiguration.java classlib6/core/src/openjdk/sun/sun/awt/FontDescriptor.java classlib6/core/src/openjdk/sun/sun/awt/GlobalCursorManager.java classlib6/core/src/openjdk/sun/sun/awt/Graphics2Delegate.java classlib6/core/src/openjdk/sun/sun/awt/HeadlessToolkit.java classlib6/core/src/openjdk/sun/sun/awt/InputMethodSupport.java classlib6/core/src/openjdk/sun/sun/awt/KeyboardFocusManagerPeerImpl.java classlib6/core/src/openjdk/sun/sun/awt/ModalExclude.java classlib6/core/src/openjdk/sun/sun/awt/ModalityEvent.java classlib6/core/src/openjdk/sun/sun/awt/ModalityListener.java classlib6/core/src/openjdk/sun/sun/awt/Mutex.java classlib6/core/src/openjdk/sun/sun/awt/NativeLibLoader.java classlib6/core/src/openjdk/sun/sun/awt/NullComponentPeer.java classlib6/core/src/openjdk/sun/sun/awt/OSInfo.java classlib6/core/src/openjdk/sun/sun/awt/OrientableFlowLayout.java classlib6/core/src/openjdk/sun/sun/awt/PeerEvent.java classlib6/core/src/openjdk/sun/sun/awt/PlatformFont.java classlib6/core/src/openjdk/sun/sun/awt/RepaintArea.java classlib6/core/src/openjdk/sun/sun/awt/RequestFocusController.java classlib6/core/src/openjdk/sun/sun/awt/ScrollPaneWheelScroller.java classlib6/core/src/openjdk/sun/sun/awt/SunDisplayChanger.java classlib6/core/src/openjdk/sun/sun/awt/SunGraphicsCallback.java classlib6/core/src/openjdk/sun/sun/awt/SunHints.java classlib6/core/src/openjdk/sun/sun/awt/Symbol.java classlib6/core/src/openjdk/sun/sun/awt/TracedEventQueue.java classlib6/core/src/openjdk/sun/sun/awt/VariableGridLayout.java classlib6/core/src/openjdk/sun/sun/awt/VerticalBagLayout.java classlib6/core/src/openjdk/sun/sun/awt/WindowAccessor.java classlib6/core/src/openjdk/sun/sun/awt/WindowClosingListener.java classlib6/core/src/openjdk/sun/sun/awt/WindowClosingSupport.java classlib6/core/src/openjdk/sun/sun/awt/WindowIDProvider.java classlib6/core/src/openjdk/sun/sun/font/AttributeMap.java classlib6/core/src/openjdk/sun/sun/font/AttributeValues.java classlib6/core/src/openjdk/sun/sun/font/BidiUtils.java classlib6/core/src/openjdk/sun/sun/font/CMap.java classlib6/core/src/openjdk/sun/sun/font/CharToGlyphMapper.java classlib6/core/src/openjdk/sun/sun/font/CompositeFont.java classlib6/core/src/openjdk/sun/sun/font/CompositeFontDescriptor.java classlib6/core/src/openjdk/sun/sun/font/CompositeGlyphMapper.java classlib6/core/src/openjdk/sun/sun/font/CompositeStrike.java classlib6/core/src/openjdk/sun/sun/font/CoreMetrics.java classlib6/core/src/openjdk/sun/sun/font/Decoration.java classlib6/core/src/openjdk/sun/sun/font/DelegatingShape.java classlib6/core/src/openjdk/sun/sun/font/EAttribute.java classlib6/core/src/openjdk/sun/sun/font/ExtendedTextLabel.java classlib6/core/src/openjdk/sun/sun/font/ExtendedTextSourceLabel.java classlib6/core/src/openjdk/sun/sun/font/FileFont.java classlib6/core/src/openjdk/sun/sun/font/FileFontStrike.java classlib6/core/src/openjdk/sun/sun/font/Font2D.java classlib6/core/src/openjdk/sun/sun/font/Font2DHandle.java classlib6/core/src/openjdk/sun/sun/font/FontDesignMetrics.java classlib6/core/src/openjdk/sun/sun/font/FontFamily.java classlib6/core/src/openjdk/sun/sun/font/FontLineMetrics.java classlib6/core/src/openjdk/sun/sun/font/FontManager.java classlib6/core/src/openjdk/sun/sun/font/FontManagerNativeLibrary.java classlib6/core/src/openjdk/sun/sun/font/FontResolver.java classlib6/core/src/openjdk/sun/sun/font/FontRunIterator.java classlib6/core/src/openjdk/sun/sun/font/FontScaler.java classlib6/core/src/openjdk/sun/sun/font/FontScalerException.java classlib6/core/src/openjdk/sun/sun/font/FontStrike.java classlib6/core/src/openjdk/sun/sun/font/FontStrikeDesc.java classlib6/core/src/openjdk/sun/sun/font/FontStrikeDisposer.java classlib6/core/src/openjdk/sun/sun/font/FreetypeFontScaler.java classlib6/core/src/openjdk/sun/sun/font/GlyphLayout.java classlib6/core/src/openjdk/sun/sun/font/GlyphList.java classlib6/core/src/openjdk/sun/sun/font/GraphicComponent.java classlib6/core/src/openjdk/sun/sun/font/NullFontScaler.java classlib6/core/src/openjdk/sun/sun/font/PhysicalFont.java classlib6/core/src/openjdk/sun/sun/font/PhysicalStrike.java classlib6/core/src/openjdk/sun/sun/font/Script.java classlib6/core/src/openjdk/sun/sun/font/ScriptRun.java classlib6/core/src/openjdk/sun/sun/font/ScriptRunData.java classlib6/core/src/openjdk/sun/sun/font/StandardGlyphVector.java classlib6/core/src/openjdk/sun/sun/font/StandardTextSource.java classlib6/core/src/openjdk/sun/sun/font/StrikeCache.java classlib6/core/src/openjdk/sun/sun/font/StrikeMetrics.java classlib6/core/src/openjdk/sun/sun/font/SunLayoutEngine.java classlib6/core/src/openjdk/sun/sun/font/TextLabel.java classlib6/core/src/openjdk/sun/sun/font/TextLabelFactory.java classlib6/core/src/openjdk/sun/sun/font/TextLineComponent.java classlib6/core/src/openjdk/sun/sun/font/TextRecord.java classlib6/core/src/openjdk/sun/sun/font/TextSource.java classlib6/core/src/openjdk/sun/sun/font/TextSourceLabel.java classlib6/core/src/openjdk/sun/sun/font/TrueTypeFont.java classlib6/core/src/openjdk/sun/sun/font/TrueTypeGlyphMapper.java classlib6/core/src/openjdk/sun/sun/font/Type1Font.java classlib6/core/src/openjdk/sun/sun/font/Type1GlyphMapper.java classlib6/core/src/openjdk/sun/sun/font/Underline.java classlib6/core/src/openjdk/sun/sun/java2d/DefaultDisposerRecord.java classlib6/core/src/openjdk/sun/sun/java2d/Disposer.java classlib6/core/src/openjdk/sun/sun/java2d/DisposerRecord.java classlib6/core/src/openjdk/sun/sun/java2d/DisposerTarget.java classlib6/core/src/openjdk/sun/sun/java2d/FontSupport.java classlib6/core/src/openjdk/sun/sun/java2d/HeadlessGraphicsEnvironment.java classlib6/core/src/openjdk/sun/sun/java2d/InvalidPipeException.java classlib6/core/src/openjdk/sun/sun/java2d/NullSurfaceData.java classlib6/core/src/openjdk/sun/sun/java2d/StateTrackable.java classlib6/core/src/openjdk/sun/sun/java2d/StateTrackableDelegate.java classlib6/core/src/openjdk/sun/sun/java2d/StateTracker.java classlib6/core/src/openjdk/sun/sun/java2d/SunCompositeContext.java classlib6/core/src/openjdk/sun/sun/java2d/SunGraphics2D.java classlib6/core/src/openjdk/sun/sun/java2d/SunGraphicsEnvironment.java classlib6/core/src/openjdk/sun/sun/java2d/SurfaceData.java classlib6/core/src/openjdk/sun/sun/java2d/SurfaceDataProxy.java Added Paths: ----------- classlib6/core/src/openjdk/sun/sun/font/CreatedFontTracker.java classlib6/core/src/openjdk/sun/sun/java2d/Spans.java Modified: classlib6/core/src/openjdk/java/java/awt/AWTError.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AWTError.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/AWTError.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/AWTEvent.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AWTEvent.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/AWTEvent.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; @@ -33,6 +33,12 @@ import java.util.logging.Logger; import java.util.logging.Level; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.io.ObjectInputStream; +import java.io.IOException; +import sun.awt.AWTAccessor; + /** * The root event class for all AWT events. * This class and its subclasses supercede the original @@ -97,10 +103,33 @@ */ protected boolean consumed = false; + /* + * The event's AccessControlContext. + */ + private transient volatile AccessControlContext acc = + AccessController.getContext(); + + /* + * Returns the acc this event was constructed with. + */ + final AccessControlContext getAccessControlContext() { + if (acc == null) { + throw new SecurityException("AWTEvent is missing AccessControlContext"); + } + return acc; + } + transient boolean focusManagerIsDispatching = false; transient boolean isPosted; /** + * Indicates whether this AWTEvent was generated by the system as + * opposed to by user code. + */ + private transient boolean isSystemGenerated; + + + /** * The event mask for selecting component events. */ public final static long COMPONENT_EVENT_MASK = 0x01; @@ -230,6 +259,19 @@ if (!GraphicsEnvironment.isHeadless()) { initIDs(); } + AWTAccessor.setAWTEventAccessor(new AWTAccessor.AWTEventAccessor() { + public void setSystemGenerated(AWTEvent ev) { + ev.isSystemGenerated = true; + } + + public boolean isSystemGenerated(AWTEvent ev) { + return ev.isSystemGenerated; + } + + public AccessControlContext getAccessControlContext(AWTEvent ev) { + return ev.getAccessControlContext(); + } + }); } private static synchronized Field get_InputEvent_CanAccessSystemClipboard() { @@ -564,4 +606,11 @@ } } } + + private void readObject(ObjectInputStream in) + throws ClassNotFoundException, IOException + { + this.acc = AccessController.getContext(); + in.defaultReadObject(); + } } // class AWTEvent Modified: classlib6/core/src/openjdk/java/java/awt/AWTEventMulticaster.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AWTEventMulticaster.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/AWTEventMulticaster.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/AWTException.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AWTException.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/AWTException.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/AWTPermission.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AWTPermission.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/AWTPermission.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/ActiveEvent.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/ActiveEvent.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/ActiveEvent.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/Adjustable.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/Adjustable.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/Adjustable.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1996-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1996, 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/AttributeValue.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AttributeValue.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/AttributeValue.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/BufferCapabilities.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/BufferCapabilities.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/BufferCapabilities.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/CheckboxGroup.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/CheckboxGroup.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/CheckboxGroup.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/Color.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/Color.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/Color.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -690,7 +690,7 @@ * @since JDK1.0 */ public boolean equals(Object obj) { - return obj instanceof Color && ((Color)obj).value == this.value; + return obj instanceof Color && ((Color)obj).getRGB() == this.getRGB(); } /** Modified: classlib6/core/src/openjdk/java/java/awt/Component.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/Component.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/Component.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -58,9 +58,11 @@ import java.lang.reflect.Method; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.AccessControlContext; import javax.accessibility.*; import java.util.logging.*; import java.applet.Applet; +import sun.awt.AWTAccessor; import sun.security.action.GetPropertyAction; import sun.awt.AppContext; @@ -451,6 +453,12 @@ static final Object LOCK = new AWTTreeLock(); static class AWTTreeLock {} + /* + * The component's AccessControlContext. + */ + private transient volatile AccessControlContext acc = + AccessController.getContext(); + /** * Minimum size. * (This field perhaps should have been transient). @@ -641,6 +649,16 @@ return changeSupportLock; } + /* + * Returns the acc this component was constructed with. + */ + final AccessControlContext getAccessControlContext() { + if (acc == null) { + throw new SecurityException("Component is missing AccessControlContext"); + } + return acc; + } + boolean isPacked = false; /** @@ -778,6 +796,16 @@ } } + static { + AWTAccessor.setComponentAccessor(new AWTAccessor.ComponentAccessor() { + public AccessControlContext getAccessControlContext(Component comp) { + return comp.getAccessControlContext(); + } + + }); + } + + /** * Constructs a new component. Class <code>Component</code> can be * extended directly to create a lightweight component that does not @@ -4307,7 +4335,7 @@ } if (eventLog.isLoggable(Level.FINEST)) { - eventLog.log(Level.FINEST, "{0}", e); + eventLog.log(Level.FINEST, "{0}", String.valueOf(e)); } /* @@ -8317,6 +8345,8 @@ { changeSupportLock = new Object(); + acc = AccessController.getContext(); + s.defaultReadObject(); appContext = AppContext.getAppContext(); Modified: classlib6/core/src/openjdk/java/java/awt/ComponentOrientation.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/ComponentOrientation.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/ComponentOrientation.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* Modified: classlib6/core/src/openjdk/java/java/awt/Composite.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/Composite.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/Composite.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1997-1998 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/CompositeContext.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/CompositeContext.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/CompositeContext.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1997-1998 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/Conditional.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/Conditional.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/Conditional.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/ContainerOrderFocusTraversalPolicy.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/ContainerOrderFocusTraversalPolicy.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/ContainerOrderFocusTraversalPolicy.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -21,7 +21,8 @@ * 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 java.awt; + */ +package java.awt; import java.util.logging.*; Modified: classlib6/core/src/openjdk/java/java/awt/DefaultFocusTraversalPolicy.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/DefaultFocusTraversalPolicy.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/DefaultFocusTraversalPolicy.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/DefaultKeyboardFocusManager.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/DefaultKeyboardFocusManager.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/DefaultKeyboardFocusManager.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; @@ -379,7 +379,7 @@ // should receive focus first if (focusLog.isLoggable(Level.FINER)) { focusLog.log(Level.FINER, "tempLost {0}, toFocus {1}", - new Object[]{tempLost, toFocus}); + new Object[]{String.valueOf(tempLost), String.valueOf(toFocus)}); } if (tempLost != null) { tempLost.requestFocusInWindow(CausedFocusEvent.Cause.ACTIVATION); @@ -447,7 +447,8 @@ Component newFocusOwner = fe.getComponent(); if (oldFocusOwner == newFocusOwner) { if (focusLog.isLoggable(Level.FINE)) { - focusLog.log(Level.FINE, "Skipping {0} because focus owner is the same", new Object[] {e}); + focusLog.log(Level.FINE, "Skipping {0} because focus owner is the same", + new Object[] {String.valueOf(e)}); } // We can't just drop the event - there could be // type-ahead markers associated with it. @@ -554,16 +555,20 @@ FocusEvent fe = (FocusEvent)e; Component currentFocusOwner = getGlobalFocusOwner(); if (currentFocusOwner == null) { - if (focusLog.isLoggable(Level.FINE)) focusLog.log(Level.FINE, "Skipping {0} because focus owner is null", - new Object[] {e}); + if (focusLog.isLoggable(Level.FINE)) { + focusLog.log(Level.FINE, "Skipping {0} because focus owner is null", + new Object[] {String.valueOf(e)}); + } break; } // Ignore cases where a Component loses focus to itself. // If we make a mistake because of retargeting, then the // FOCUS_GAINED handler will correct it. if (currentFocusOwner == fe.getOppositeComponent()) { - if (focusLog.isLoggable(Level.FINE)) focusLog.log(Level.FINE, "Skipping {0} because current focus owner is equal to opposite", - new Object[] {e}); + if (focusLog.isLoggable(Level.FINE)) { + focusLog.log(Level.FINE, "Skipping {0} because current focus owner is equal to opposite", + new Object[] {String.valueOf(e)}); + } break; } @@ -631,9 +636,11 @@ Window losingFocusWindow = we.getWindow(); Window activeWindow = getGlobalActiveWindow(); Window oppositeWindow = we.getOppositeWindow(); - if (focusLog.isLoggable(Level.FINE)) focusLog.log(Level.FINE, "Active {0}, Current focused {1}, losing focus {2} opposite {3}", - new Object[] {activeWindow, currentFocusedWindow, - losingFocusWindow, oppositeWindow}); + if (focusLog.isLoggable(Level.FINE)) { + focusLog.log(Level.FINE, "Active {0}, Current focused {1}, losing focus {2} opposite {3}", + new Object[] {String.valueOf(activeWindow), String.valueOf(currentFocusedWindow), + String.valueOf(losingFocusWindow), String.valueOf(oppositeWindow)}); + } if (currentFocusedWindow == null) { break; } @@ -819,7 +826,10 @@ } } if (ke != null) { - focusLog.log(Level.FINER, "Pumping approved event {0}", new Object[] {ke}); + if (focusLog.isLoggable(Level.FINER)) { + focusLog.log(Level.FINER, "Pumping approved event {0}", + new Object[] {String.valueOf(ke)}); + } enqueuedKeyEvents.removeFirst(); } } @@ -841,7 +851,7 @@ Iterator iter = typeAheadMarkers.iterator(); while (iter.hasNext()) { TypeAheadMarker marker = (TypeAheadMarker)iter.next(); - focusLog.log(Level.FINEST, " {0}", marker); + focusLog.log(Level.FINEST, " {0}", String.valueOf(marker)); } } } @@ -869,7 +879,10 @@ // The fix is rolled out. if (ke.getWhen() > marker.after) { - focusLog.log(Level.FINER, "Storing event {0} because of marker {1}", new Object[] {ke, marker}); + if (focusLog.isLoggable(Level.FINER)) { + focusLog.log(Level.FINER, "Storing event {0} because of marker {1}", + new Object[] {String.valueOf(ke), String.valueOf(marker)}); + } enqueuedKeyEvents.addLast(ke); return true; } @@ -881,7 +894,10 @@ } case FocusEvent.FOCUS_GAINED: - focusLog.log(Level.FINEST, "Markers before FOCUS_GAINED on {0}", new Object[] {target}); + if (focusLog.isLoggable(Level.FINEST)) { + focusLog.log(Level.FINEST, "Markers before FOCUS_GAINED on {0}", + new Object[] {String.valueOf(target)}); + } dumpMarkers(); // Search the marker list for the first marker tied to // the Component which just gained focus. Then remove @@ -910,7 +926,9 @@ } } else { // Exception condition - event without marker - focusLog.log(Level.FINER, "Event without marker {0}", e); + if (focusLog.isLoggable(Level.FINER)) { + focusLog.log(Level.FINER, "Event without marker {0}", String.valueOf(e)); + } } } focusLog.log(Level.FINEST, "Markers after FOCUS_GAINED"); @@ -1147,8 +1165,10 @@ return; } + if (focusLog.isLoggable(Level.FINER)) { focusLog.log(Level.FINER, "Enqueue at {0} for {1}", - new Object[] {after, untilFocused}); + new Object[] {after, String.valueOf(untilFocused)}); + } int insertionIndex = 0, i = typeAheadMarkers.size(); @@ -1187,8 +1207,10 @@ return; } + if (focusLog.isLoggable(Level.FINER)) { focusLog.log(Level.FINER, "Dequeue at {0} for {1}", - new Object[] {after, untilFocused}); + new Object[] {after, String.valueOf(untilFocused)}); + } TypeAheadMarker marker; ListIterator iter = typeAheadMarkers.listIterator Modified: classlib6/core/src/openjdk/java/java/awt/DisplayMode.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/DisplayMode.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/DisplayMode.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt; Modified: classlib6/core/src/openjdk/java/java/awt/Event.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/Event.java 2011-03-05 13:27:27 UTC (rev 5804) +++ classlib6/core/src/openjdk/java/java/awt/Event.java 2011-03-06 18:55:51 UTC (rev 5805) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth ... [truncated message content] |
From: <ls...@us...> - 2011-03-05 13:27:38
|
Revision: 5804 http://jnode.svn.sourceforge.net/jnode/?rev=5804&view=rev Author: lsantha Date: 2011-03-05 13:27:27 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/sun/sun/swing/BakedArrayList.java classlib6/core/src/openjdk/sun/sun/swing/CachedPainter.java classlib6/core/src/openjdk/sun/sun/swing/DefaultLookup.java classlib6/core/src/openjdk/sun/sun/swing/FilePane.java classlib6/core/src/openjdk/sun/sun/swing/ImageCache.java classlib6/core/src/openjdk/sun/sun/swing/ImageIconUIResource.java classlib6/core/src/openjdk/sun/sun/swing/MenuItemCheckIconFactory.java classlib6/core/src/openjdk/sun/sun/swing/PrintColorUIResource.java classlib6/core/src/openjdk/sun/sun/swing/StringUIClientPropertyKey.java classlib6/core/src/openjdk/sun/sun/swing/SwingLazyValue.java classlib6/core/src/openjdk/sun/sun/swing/SwingUtilities2.java classlib6/core/src/openjdk/sun/sun/swing/UIAction.java classlib6/core/src/openjdk/sun/sun/swing/UIClientPropertyKey.java classlib6/core/src/openjdk/sun/sun/swing/WindowsPlacesBar.java classlib6/core/src/openjdk/sun/sun/swing/plaf/synth/DefaultSynthStyle.java classlib6/core/src/openjdk/sun/sun/swing/plaf/synth/Paint9Painter.java classlib6/core/src/openjdk/sun/sun/swing/plaf/synth/StyleAssociation.java classlib6/core/src/openjdk/sun/sun/swing/plaf/synth/SynthFileChooserUI.java classlib6/core/src/openjdk/sun/sun/swing/plaf/synth/SynthFileChooserUIImpl.java classlib6/core/src/openjdk/sun/sun/swing/plaf/synth/SynthIcon.java classlib6/core/src/openjdk/sun/sun/swing/plaf/synth/SynthUI.java classlib6/core/src/openjdk/sun/sun/swing/table/DefaultTableCellHeaderRenderer.java classlib6/core/src/openjdk/sun/sun/tools/jar/CommandLine.java classlib6/core/src/openjdk/sun/sun/tools/jar/JarException.java classlib6/core/src/openjdk/sun/sun/tools/jar/JarImageSource.java classlib6/core/src/openjdk/sun/sun/tools/jar/JarVerifierStream.java classlib6/core/src/openjdk/sun/sun/tools/jar/Main.java classlib6/core/src/openjdk/sun/sun/tools/jar/Manifest.java classlib6/core/src/openjdk/sun/sun/tools/jar/SignatureFile.java classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_de.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_es.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_fr.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_it.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_ja.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_ko.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_sv.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_zh_CN.properties classlib6/core/src/openjdk/sun/sun/tools/jar/resources/jar_zh_TW.properties classlib6/core/src/openjdk/sun/sun/tools/javac/resources/javac.properties classlib6/core/src/openjdk/sun/sun/tools/javac/resources/javac_ja.properties classlib6/core/src/openjdk/sun/sun/tools/javac/resources/javac_zh_CN.properties classlib6/core/src/openjdk/sun/sun/util/calendar/AbstractCalendar.java classlib6/core/src/openjdk/sun/sun/util/calendar/BaseCalendar.java classlib6/core/src/openjdk/sun/sun/util/calendar/CalendarDate.java classlib6/core/src/openjdk/sun/sun/util/calendar/CalendarSystem.java classlib6/core/src/openjdk/sun/sun/util/calendar/CalendarUtils.java classlib6/core/src/openjdk/sun/sun/util/calendar/Era.java classlib6/core/src/openjdk/sun/sun/util/calendar/Gregorian.java classlib6/core/src/openjdk/sun/sun/util/calendar/JulianCalendar.java classlib6/core/src/openjdk/sun/sun/util/calendar/ZoneInfo.java classlib6/core/src/openjdk/sun/sun/util/calendar/ZoneInfoFile.java classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_de.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_es.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_fr.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_it.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_ja.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_ko.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_sv.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_zh_CN.properties classlib6/core/src/openjdk/sun/sun/util/logging/resources/logging_zh_TW.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_ar.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_be.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_bg.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_ca.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_cs.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_da.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_de.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_el.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_el_CY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_en.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_en_GB.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_en_IE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_en_MT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_es.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_es_ES.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_es_US.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_et.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_fi.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_fr.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_fr_CA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_hi.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_hr.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_hu.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_in_ID.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_is.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_it.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_iw.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_ja.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_ko.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_lt.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_lv.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_mk.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_ms_MY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_mt.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_mt_MT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_nl.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_no.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_pl.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_pt.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_pt_PT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_ro.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_ru.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_sk.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_sl.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_sq.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_sr.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_sv.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_th.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_tr.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_uk.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_vi.properties classlib6/core/src/openjdk/sun/sun/util/resources/CalendarData_zh.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_AE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_BH.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_DZ.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_EG.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_IQ.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_JO.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_KW.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_LB.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_LY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_MA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_OM.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_QA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_SA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_SD.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_SY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_TN.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ar_YE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_be_BY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_bg_BG.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ca_ES.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_cs_CZ.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_da_DK.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_de.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_de_AT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_de_CH.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_de_DE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_de_GR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_de_LU.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_el_CY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_el_GR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_AU.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_CA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_GB.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_IE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_IN.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_MT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_NZ.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_PH.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_SG.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_US.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_en_ZA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_AR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_BO.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_CL.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_CO.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_CR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_DO.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_EC.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_ES.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_GT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_HN.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_MX.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_NI.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_PA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_PE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_PR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_PY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_SV.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_US.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_UY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_es_VE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_et_EE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_fi_FI.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_fr.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_fr_BE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_fr_CA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_fr_CH.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_fr_FR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_fr_LU.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ga_IE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_hi_IN.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_hr_HR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_hu_HU.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_in_ID.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_is_IS.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_it.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_it_CH.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_it_IT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_iw_IL.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ja.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ja_JP.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ko.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ko_KR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_lt_LT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_lv_LV.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_mk_MK.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ms_MY.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_mt_MT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_nl_BE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_nl_NL.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_no_NO.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_pl_PL.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_pt_BR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_pt_PT.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ro_RO.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_ru_RU.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sk_SK.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sl_SI.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sq_AL.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sr_BA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sr_CS.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sr_ME.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sv.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_sv_SE.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_th_TH.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_tr_TR.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_uk_UA.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_vi_VN.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_zh_CN.properties classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_zh_HK.java classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_zh_SG.java classlib6/core/src/openjdk/sun/sun/util/resources/CurrencyNames_zh_TW.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleData.java classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ar.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_be.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_bg.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ca.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_cs.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_da.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_de.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_el.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_el_CY.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_en.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_en_MT.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_en_PH.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_en_SG.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_es.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_es_US.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_et.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_fi.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_fr.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ga.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_hi.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_hr.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_hu.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_in.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_is.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_it.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_iw.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ja.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ko.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_lt.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_lv.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_mk.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ms.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_mt.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_nl.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_no.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_no_NO_NY.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_pl.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_pt.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_pt_BR.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_pt_PT.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ro.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_ru.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_sk.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_sl.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_sq.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_sr.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_sv.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_th.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_tr.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_uk.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_vi.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_zh.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_zh_SG.properties classlib6/core/src/openjdk/sun/sun/util/resources/LocaleNames_zh_TW.properties classlib6/core/src/openjdk/sun/sun/util/resources/OpenListResourceBundle.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNamesBundle.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_de.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_en.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_en_CA.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_en_GB.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_en_IE.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_es.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_fr.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_hi.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_it.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_ja.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_ko.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_sv.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_zh_CN.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_zh_HK.java classlib6/core/src/openjdk/sun/sun/util/resources/TimeZoneNames_zh_TW.java Added Paths: ----------- classlib6/core/src/openjdk/sun/sun/swing/MenuItemLayoutHelper.java classlib6/core/src/openjdk/sun/sun/util/calendar/TzIDOldMapping.java Modified: classlib6/core/src/openjdk/sun/sun/swing/BakedArrayList.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/BakedArrayList.java 2011-03-05 13:13:50 UTC (rev 5803) +++ classlib6/core/src/openjdk/sun/sun/swing/BakedArrayList.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -1,12 +1,12 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.swing; Modified: classlib6/core/src/openjdk/sun/sun/swing/CachedPainter.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/CachedPainter.java 2011-03-05 13:13:50 UTC (rev 5803) +++ classlib6/core/src/openjdk/sun/sun/swing/CachedPainter.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -1,12 +1,12 @@ /* - * Copyright 2004-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.swing; Modified: classlib6/core/src/openjdk/sun/sun/swing/DefaultLookup.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/DefaultLookup.java 2011-03-05 13:13:50 UTC (rev 5803) +++ classlib6/core/src/openjdk/sun/sun/swing/DefaultLookup.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -1,12 +1,12 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,15 +18,16 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.swing; import java.awt.Color; import java.awt.Insets; import javax.swing.*; +import javax.swing.border.Border; import javax.swing.plaf.ComponentUI; import sun.awt.AppContext; @@ -46,8 +47,7 @@ /** * Key used to store DefaultLookup for AppContext. */ - private static final Object DEFAULT_LOOKUP_KEY = new - StringBuffer("DefaultLookup"); + private static final Object DEFAULT_LOOKUP_KEY = new Object(); // DefaultLookup /** * Thread that last asked for a default. */ @@ -137,6 +137,10 @@ return ((Number)iValue).intValue(); } + public static int getInt(JComponent c, ComponentUI ui, String key) { + return getInt(c, ui, key, -1); + } + public static Insets getInsets(JComponent c, ComponentUI ui, String key, Insets defaultValue) { Object iValue = get(c, ui, key); @@ -147,6 +151,10 @@ return (Insets)iValue; } + public static Insets getInsets(JComponent c, ComponentUI ui, String key) { + return getInsets(c, ui, key, null); + } + public static boolean getBoolean(JComponent c, ComponentUI ui, String key, boolean defaultValue) { Object iValue = get(c, ui, key); @@ -157,6 +165,10 @@ return ((Boolean)iValue).booleanValue(); } + public static boolean getBoolean(JComponent c, ComponentUI ui, String key) { + return getBoolean(c, ui, key, false); + } + public static Color getColor(JComponent c, ComponentUI ui, String key, Color defaultValue) { Object iValue = get(c, ui, key); @@ -167,8 +179,36 @@ return (Color)iValue; } + public static Color getColor(JComponent c, ComponentUI ui, String key) { + return getColor(c, ui, key, null); + } + public static Icon getIcon(JComponent c, ComponentUI ui, String key, + Icon defaultValue) { + Object iValue = get(c, ui, key); + if (iValue == null || !(iValue instanceof Icon)) { + return defaultValue; + } + return (Icon)iValue; + } + public static Icon getIcon(JComponent c, ComponentUI ui, String key) { + return getIcon(c, ui, key, null); + } + + public static Border getBorder(JComponent c, ComponentUI ui, String key, + Border defaultValue) { + Object iValue = get(c, ui, key); + if (iValue == null || !(iValue instanceof Border)) { + return defaultValue; + } + return (Border)iValue; + } + + public static Border getBorder(JComponent c, ComponentUI ui, String key) { + return getBorder(c, ui, key, null); + } + public Object getDefault(JComponent c, ComponentUI ui, String key) { // basic return UIManager.get(key, c.getLocale()); Modified: classlib6/core/src/openjdk/sun/sun/swing/FilePane.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/FilePane.java 2011-03-05 13:13:50 UTC (rev 5803) +++ classlib6/core/src/openjdk/sun/sun/swing/FilePane.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -1,13 +1,13 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -19,9 +19,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.swing; @@ -263,6 +263,7 @@ private Color listViewBackground; private boolean listViewWindowsStyle; private boolean readOnly; + private boolean fullRowSelection = false; private ListSelectionModel listSelectionModel; private JList list; @@ -446,6 +447,7 @@ kiloByteString = UIManager.getString("FileChooser.fileSizeKiloBytes", l); megaByteString = UIManager.getString("FileChooser.fileSizeMegaBytes", l); gigaByteString = UIManager.getString("FileChooser.fileSizeGigaBytes", l); + fullRowSelection = UIManager.getBoolean("FileView.fullRowSelection"); renameErrorTitleText = UIManager.getString("FileChooser.renameErrorTitleText", l); renameErrorText = UIManager.getString("FileChooser.renameErrorText", l); @@ -976,6 +978,7 @@ public DetailsTableCellEditor(JTextField tf) { super(tf); this.tf = tf; + tf.setName("Table.editor"); tf.addFocusListener(editorFocusListener); } @@ -1003,7 +1006,8 @@ } public void setBounds(int x, int y, int width, int height) { - if (getHorizontalAlignment() == SwingConstants.LEADING) { + if (getHorizontalAlignment() == SwingConstants.LEADING && + !fullRowSelection) { // Restrict width to actual text width = Math.min(width, this.getPreferredSize().width+4); } else { @@ -1024,9 +1028,9 @@ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { - if (table.convertColumnIndexToModel(column) != COLUMN_FILENAME || - (listViewWindowsStyle && !table.isFocusOwner())) { - + if ((table.convertColumnIndexToModel(column) != COLUMN_FILENAME || + (listViewWindowsStyle && !table.isFocusOwner())) && + !fullRowSelection) { isSelected = false; } @@ -1322,6 +1326,7 @@ Rectangle r = list.getCellBounds(index, index); if (editCell == null) { editCell = new JTextField(); + editCell.setName("Tree.cellEditor"); editCell.addActionListener(new EditActionListener()); editCell.addFocusListener(editorFocusListener); editCell.setNextFocusableComponent(list); @@ -1774,10 +1779,11 @@ Point p = evt.getPoint(); index = table.rowAtPoint(p); - if (SwingUtilities2.pointOutsidePrefSize(table, - index, - table.columnAtPoint(p), p)) { + boolean pointOutsidePrefSize = + SwingUtilities2.pointOutsidePrefSize( + table, index, table.columnAtPoint(p), p); + if (pointOutsidePrefSize && !fullRowSelection) { return; } Modified: classlib6/core/src/openjdk/sun/sun/swing/ImageCache.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/ImageCache.java 2011-03-05 13:13:50 UTC (rev 5803) +++ classlib6/core/src/openjdk/sun/sun/swing/ImageCache.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -1,12 +1,12 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.swing; Modified: classlib6/core/src/openjdk/sun/sun/swing/ImageIconUIResource.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/ImageIconUIResource.java 2011-03-05 13:13:50 UTC (rev 5803) +++ classlib6/core/src/openjdk/sun/sun/swing/ImageIconUIResource.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -1,12 +1,12 @@ /* - * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.swing; Modified: classlib6/core/src/openjdk/sun/sun/swing/MenuItemCheckIconFactory.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/MenuItemCheckIconFactory.java 2011-03-05 13:13:50 UTC (rev 5803) +++ classlib6/core/src/openjdk/sun/sun/swing/MenuItemCheckIconFactory.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -1,12 +1,12 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.swing; Added: classlib6/core/src/openjdk/sun/sun/swing/MenuItemLayoutHelper.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/swing/MenuItemLayoutHelper.java (rev 0) +++ classlib6/core/src/openjdk/sun/sun/swing/MenuItemLayoutHelper.java 2011-03-05 13:27:27 UTC (rev 5804) @@ -0,0 +1,1339 @@ +/* + * Copyright (c) 2002, 2008, 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.swing; + +import static sun.swing.SwingUtilities2.BASICMENUITEMUI_MAX_TEXT_OFFSET; + +import javax.swing.*; +import javax.swing.plaf.basic.BasicHTML; +import javax.swing.text.View; +import java.awt.*; +import java.awt.event.KeyEvent; +import java.util.Map; +import java.util.HashMap; + +/** + * Calculates preferred size and layouts menu items. + */ +public class MenuItemLayoutHelper { + + /* Client Property keys for calculation of maximal widths */ + public static final StringUIClientPropertyKey MAX_ARROW_WIDTH = + new StringUIClientPropertyKey("maxArrowWidth"); + public static final StringUIClientPropertyKey MAX_CHECK_WIDTH = + new StringUIClientPropertyKey("maxCheckWidth"); + public static final StringUIClientPropertyKey MAX_ICON_WIDTH = + new StringUIClientPropertyKey("maxIconWidth"); + public static final StringUIClientPropertyKey MAX_TEXT_WIDTH = + new StringUIClientPropertyKey("maxTextWidth"); + public static final StringUIClientPropertyKey MAX_ACC_WIDTH = + new StringUIClientPropertyKey("maxAccWidth"); + public static final StringUIClientPropertyKey MAX_LABEL_WIDTH = + new StringUIClientPropertyKey("maxLabelWidth"); + + private JMenuItem mi; + private JComponent miParent; + + private Font font; + private Font accFont; + private FontMetrics fm; + private FontMetrics accFm; + + private Icon icon; + private Icon checkIcon; + private Icon arrowIcon; + private String text; + private String accText; + + private boolean isColumnLayout; + private boolean useCheckAndArrow; + private boolean isLeftToRight; + private boolean isTopLevelMenu; + private View htmlView; + + private int verticalAlignment; + private int horizontalAlignment; + private int verticalTextPosition; + private int horizontalTextPosition; + private int gap; + private int leadingGap; + private int afterCheckIconGap; + private int minTextOffset; + + private Rectangle viewRect; + + private RectSize iconSize; + private RectSize textSize; + private RectSize accSize; + private RectSize checkSize; + private RectSize arrowSize; + private RectSize labelSize; + + /** + * The empty protected constructor is necessary for derived classes. + */ + protected MenuItemLayoutHelper() { + } + + public MenuItemLayoutHelper(JMenuItem mi, Icon checkIcon, Icon arrowIcon, + Rectangle viewRect, int gap, String accDelimiter, + boolean isLeftToRight, Font font, Font accFont, + boolean useCheckAndArrow, String propertyPrefix) { + reset(mi, checkIcon, arrowIcon, viewRect, gap, accDelimiter, + isLeftToRight, font, accFont, useCheckAndArrow, propertyPrefix); + } + + protected void reset(JMenuItem mi, Icon checkIcon, Icon arrowIcon, + Rectangle viewRect, int gap, String accDelimiter, + boolean isLeftToRight, Font font, Font accFont, + boolean useCheckAndArrow, String propertyPrefix) { + this.mi = mi; + this.miParent = getMenuItemParent(mi); + this.accText = getAccText(accDelimiter); + this.verticalAlignment = mi.getVerticalAlignment(); + this.horizontalAlignment = mi.getHorizontalAlignment(); + this.verticalTextPosition = mi.getVerticalTextPosition(); + this.horizontalTextPosition = mi.getHorizontalTextPosition(); + this.useCheckAndArrow = useCheckAndArrow; + this.font = font; + this.accFont = accFont; + this.fm = mi.getFontMetrics(font); + this.accFm = mi.getFontMetrics(accFont); + this.isLeftToRight = isLeftToRight; + this.isColumnLayout = isColumnLayout(isLeftToRight, + horizontalAlignment, horizontalTextPosition, + verticalTextPosition); + this.isTopLevelMenu = (this.miParent == null) ? true : false; + this.checkIcon = checkIcon; + this.icon = getIcon(propertyPrefix); + this.arrowIcon = arrowIcon; + this.text = mi.getText(); + this.gap = gap; + this.afterCheckIconGap = getAfterCheckIconGap(propertyPrefix); + this.minTextOffset = getMinTextOffset(propertyPrefix); + this.htmlView = (View) mi.getClientProperty(BasicHTML.propertyKey); + this.viewRect = viewRect; + + this.iconSize = new RectSize(); + this.textSize = new RectSize(); + this.accSize = new RectSize(); + this.checkSize = new RectSize(); + this.arrowSize = new RectSize(); + this.labelSize = new RectSize(); + calcWidthsAndHeights(); + setOriginalWidths(); + calcMaxWidths(); + + this.leadingGap = getLeadingGap(propertyPrefix); + calcMaxTextOffset(viewRect); + } + + private void setOriginalWidths() { + iconSize.origWidth = iconSize.width; + textSize.origWidth = textSize.width; + accSize.origWidth = accSize.width; + checkSize.origWidth = checkSize.width; + arrowSize.origWidth = arrowSize.width; + } + + private String getAccText(String acceleratorDelimiter) { + String accText = ""; + KeyStroke accelerator = mi.getAccelerator(); + if (accelerator != null) { + int modifiers = accelerator.getModifiers(); + if (modifiers > 0) { + accText = KeyEvent.getKeyModifiersText(modifiers); + accText += acceleratorDelimiter; + } + int keyCode = accelerator.getKeyCode(); + if (keyCode != 0) { + accText += KeyEvent.getKeyText(keyCode); + } else { + accText += accelerator.getKeyChar(); + } + } + return accText; + } + + private Icon getIcon(String propertyPrefix) { + // In case of column layout, .checkIconFactory is defined for this UI, + // the icon is compatible with it and useCheckAndArrow() is true, + // then the icon is handled by the checkIcon. + Icon icon = null; + MenuItemCheckIconFactory iconFactory = + (MenuItemCheckIconFactory) UIManager.get(propertyPrefix + + ".checkIconFactory"); + if (!isColumnLayout || !useCheckAndArrow || iconFactory == null + || !iconFactory.isCompatible(checkIcon, propertyPrefix)) { + icon = mi.getIcon(); + } + return icon; + } + + private int getMinTextOffset(String propertyPrefix) { + int minimumTextOffset = 0; + Object minimumTextOffsetObject = + UIManager.get(propertyPrefix + ".minimumTextOffset"); + if (minimumTextOffsetObject instanceof Integer) { + minimumTextOffset = (Integer) minimumTextOffsetObject; + } + return minimumTextOffset; + } + + private int getAfterCheckIconGap(String propertyPrefix) { + int afterCheckIconGap = gap; + Object afterCheckIconGapObject = + UIManager.get(propertyPrefix + ".afterCheckIconGap"); + if (afterCheckIconGapObject instanceof Integer) { + afterCheckIconGap = (Integer) afterCheckIconGapObject; + } + return afterCheckIconGap; + } + + private int getLeadingGap(String propertyPrefix) { + if (checkSize.getMaxWidth() > 0) { + return getCheckOffset(propertyPrefix); + } else { + return gap; // There is no any check icon + } + } + + private int getCheckOffset(String propertyPrefix) { + int checkIconOffset = gap; + Object checkIconOffsetObject = + UIManager.get(propertyPrefix + ".checkIconOffset"); + if (checkIconOffsetObject instanceof Integer) { + checkIconOffset = (Integer) checkIconOffsetObject; + } + return checkIconOffset; + } + + protected void calcWidthsAndHeights() { + // iconRect + if (icon != null) { + iconSize.width = icon.getIconWidth(); + iconSize.height = icon.getIconHeight(); + } + + // accRect + if (!accText.equals("")) { + accSize.width = SwingUtilities2.stringWidth(mi, accFm, accText); + accSize.height = accFm.getHeight(); + } + + // textRect + if (text == null) { + text = ""; + } else if (!text.equals("")) { + if (htmlView != null) { + // Text is HTML + textSize.width = + (int) htmlView.getPreferredSpan(View.X_AXIS); + textSize.height = + (int) htmlView.getPreferredSpan(View.Y_AXIS); + } else { + // Text isn't HTML + textSize.width = SwingUtilities2.stringWidth(mi, fm, text); + textSize.height = fm.getHeight(); + } + } + + if (useCheckAndArrow) { + // checkIcon + if (checkIcon != null) { + checkSize.width = checkIcon.getIconWidth(); + checkSize.height = checkIcon.getIconHeight(); + } + // arrowRect + if (arrowIcon != null) { + arrowSize.width = arrowIcon.getIconWidth(); + arrowSize.height = arrowIcon.getIconHeight(); + } + } + + // labelRect + if (isColumnLayout) { + labelSize.width = iconSize.width + textSize.width + gap; + labelSize.height = max(checkSize.height, iconSize.height, + textSize.height, accSize.height, arrowSize.height); + } else { + Rectangle textRect = new Rectangle(); + Rectangle iconRect = new Rectangle(); + SwingUtilities.layoutCompoundLabel(mi, fm, text, icon, + verticalAlignment, horizontalAlignment, + verticalTextPosition, horizontalTextPosition, + viewRect, iconRect, textRect, gap); + Rectangle labelRect = iconRect.union(textRect); + labelSize.height = labelRect.height; + labelSize.width = labelRect.width; + } + } + + protected void calcMaxWidths() { + calcMaxWidth(checkSize, MAX_CHECK_WIDTH); + calcMaxWidth(arrowSize, MAX_ARROW_WIDTH); + calcMaxWidth(accSize, MAX_ACC_WIDTH); + + if (isColumnLayout) { + calcMaxWidth(iconSize, MAX_ICON_WIDTH); + calcMaxWidth(textSize, MAX_TEXT_WIDTH); + int curGap = gap; + if ((iconSize.getMaxWidth() == 0) + || (textSize.getMaxWidth() == 0)) { + curGap = 0; + } + labelSize.maxWidth = + calcMaxValue(MAX_LABEL_WIDTH, iconSize.maxWidth + + textSize.maxWidth + curGap); + } else { + // We shouldn't use current icon and text widths + // in maximal widths calculation for complex layout. + iconSize.maxWidth = getParentIntProperty(MAX_ICON_WIDTH); + calcMaxWidth(labelSize, MAX_LABEL_WIDTH); + // If maxLabelWidth is wider + // than the widest icon + the widest text + gap, + // we should update the maximal text witdh + int candidateTextWidth = labelSize.maxWidth - iconSize.maxWidth; + if (iconSize.maxWidth > 0) { + candidateTextWidth -= gap; + } + textSize.maxWidth = calcMaxValue(MAX_TEXT_WIDTH, candidateTextWidth); + } + } + + protected void calcMaxWidth(RectSize rs, Object key) { + rs.maxWidth = calcMaxValue(key, rs.width); + } + + /** + * Calculates and returns maximal value through specified parent component + * client property. + * + * @param propertyName name of the property, which stores the maximal value. + * @param value a value which pretends to be maximal + * @return maximal value among the parent property and the value. + */ + protected int calcMaxValue(Object propertyName, int value) { + // Get maximal value from parent client property + int maxValue = getParentIntProperty(propertyName); + // Store new maximal width in parent client property + if (value > maxValue) { + if (miParent != null) { + miParent.putClientProperty(propertyName, value); + } + return value; + } else { + return maxValue; + } + } + + /** + * Returns parent client property as int. + * @param propertyName name of the parent property. + * @return value of the property as int. + */ + protected int getParentIntProperty(Object propertyName) { + Object value = null; + if (miParent != null) { + value = miParent.getClientProperty(propertyName); + } + if ((value == null) || !(value instanceof Integer)) { + value = 0; + } + return (Integer) value; + } + + public static boolean isColumnLayout(boolean isLeftToRight, + JMenuItem mi) { + assert(mi != null); + return isColumnLayout(isLeftToRight, mi.getHorizontalAlignment(), + mi.getHorizontalTextPosition(), mi.getVerticalTextPosition()); + } + + /** + * Answers should we do column layout for a menu item or not. + * We do it when a user doesn't set any alignments + * and text positions manually, except the vertical alignment. + */ + public static boolean isColumnLayout(boolean isLeftToRight, + int horizontalAlignment, + int horizontalTextPosition, + int verticalTextPosition) { + if (verticalTextPosition != SwingConstants.CENTER) { + return false; + } + if (isLeftToRight) { + if (horizontalAlignment != SwingConstants.LEADING + && horizontalAlignment != SwingConstants.LEFT) { + return false; + } + if (horizontalTextPosition != SwingConstants.TRAILING + && horizontalTextPosition != SwingConstants.RIGHT) { + return false; + } + } else { + if (horizontalAlignment != SwingConstants.LEADING + && horizontalAlignment != SwingConstants.RIGHT) { + return false; + } + if (horizontalTextPosition != SwingConstants.TRAILING + && horizontalTextPosition != SwingConstants.LEFT) { + return false; + } + } + return true; + } + + /** + * Calculates maximal text offset. + * It is required for some L&Fs (ex: Vista L&F). + * The offset is meaningful only for L2R column layout. + * + * @param viewRect the rectangle, the maximal text offset + * will be calculated for. + */ + private void calcMaxTextOffset(Rectangle viewRect) { + if (!isColumnLayout || !isLeftToRight) { + return; + } + + // Calculate the current text offset + int offset = viewRect.x + leadingGap + checkSize.maxWidth + + afterCheckIconGap + iconSize.maxWidth + gap; + if (checkSize.maxWidth == 0) { + offset -= afterCheckIconGap; + } + if (iconSize.maxWidth == 0) { + offset -= gap; + } + + // maximal text offset shouldn't be less than minimal text offset; + if (offset < minTextOffset) { + offset = minTextOffset; + } + + // Calculate and store the maximal text offset + calcMaxValue(SwingUtilities2.BASICMENUITEMUI_MAX_TEXT_OFFSET, offset); + } + + /** + * Layout icon, text, check icon, accelerator text and arrow icon + * in the viewRect and return their positions. + * + * If horizontalAlignment, verticalTextPosition and horizontalTextPosition + * are default (user doesn't set any manually) the layouting algorithm is: + *... [truncated message content] |
From: <ls...@us...> - 2011-03-05 13:14:01
|
Revision: 5803 http://jnode.svn.sourceforge.net/jnode/?rev=5803&view=rev Author: lsantha Date: 2011-03-05 13:13:50 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/sun/sun/security/jgss/krb5/InitialToken.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/Config.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/JarVerifier.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/KeyCache.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Cipher.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DHKeyFactory.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DSAKeyFactory.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Digest.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECDHKeyAgreement.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECKeyFactory.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Key.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyAgreement.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyFactory.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyGenerator.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyPairGenerator.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyStore.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Mac.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11RSACipher.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11RSAKeyFactory.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11SecretKeyFactory.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11SecureRandom.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Signature.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11TlsKeyMaterialGenerator.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11TlsMasterSecretGenerator.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11TlsPrfGenerator.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Util.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/Session.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/SessionManager.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/SunPKCS11.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/TemplateManager.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/Token.java classlib6/core/src/openjdk/sun/sun/security/pkcs11/wrapper/PKCS11Exception.java classlib6/core/src/openjdk/sun/sun/security/provider/ByteArrayAccess.java classlib6/core/src/openjdk/sun/sun/security/provider/DSA.java classlib6/core/src/openjdk/sun/sun/security/provider/DSAKeyFactory.java classlib6/core/src/openjdk/sun/sun/security/provider/DSAKeyPairGenerator.java classlib6/core/src/openjdk/sun/sun/security/provider/DSAParameterGenerator.java classlib6/core/src/openjdk/sun/sun/security/provider/DSAParameters.java classlib6/core/src/openjdk/sun/sun/security/provider/DSAPrivateKey.java classlib6/core/src/openjdk/sun/sun/security/provider/DSAPublicKey.java classlib6/core/src/openjdk/sun/sun/security/provider/DigestBase.java classlib6/core/src/openjdk/sun/sun/security/provider/IdentityDatabase.java classlib6/core/src/openjdk/sun/sun/security/provider/JavaKeyStore.java classlib6/core/src/openjdk/sun/sun/security/provider/KeyProtector.java classlib6/core/src/openjdk/sun/sun/security/provider/MD2.java classlib6/core/src/openjdk/sun/sun/security/provider/MD5.java classlib6/core/src/openjdk/sun/sun/security/provider/ParameterCache.java classlib6/core/src/openjdk/sun/sun/security/provider/PolicyFile.java classlib6/core/src/openjdk/sun/sun/security/provider/PolicyParser.java classlib6/core/src/openjdk/sun/sun/security/provider/SHA.java classlib6/core/src/openjdk/sun/sun/security/provider/SHA2.java classlib6/core/src/openjdk/sun/sun/security/provider/SHA5.java classlib6/core/src/openjdk/sun/sun/security/provider/SecureRandom.java classlib6/core/src/openjdk/sun/sun/security/provider/SeedGenerator.java classlib6/core/src/openjdk/sun/sun/security/provider/Sun.java classlib6/core/src/openjdk/sun/sun/security/provider/SunEntries.java classlib6/core/src/openjdk/sun/sun/security/provider/SystemIdentity.java classlib6/core/src/openjdk/sun/sun/security/provider/SystemSigner.java classlib6/core/src/openjdk/sun/sun/security/provider/VerificationProvider.java classlib6/core/src/openjdk/sun/sun/security/provider/X509Factory.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/AdjacencyList.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/BasicChecker.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/BuildStep.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/Builder.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/CertId.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/CertPathHelper.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/CollectionCertStore.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ConstraintsChecker.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/CrlRevocationChecker.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/DistributionPointFetcher.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ForwardBuilder.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ForwardState.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/IndexedCollectionCertStore.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/KeyChecker.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/LDAPCertStore.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/OCSPChecker.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/OCSPRequest.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/OCSPResponse.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/PKIXCertPathValidator.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/PKIXMasterCertPathValidator.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/PolicyChecker.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/PolicyNodeImpl.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ReverseBuilder.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ReverseState.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/State.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilder.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilderException.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilderParameters.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilderResult.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/URICertStore.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/Vertex.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/X509CertPath.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/X509CertificatePair.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSACore.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSAKeyFactory.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSAKeyPairGenerator.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSAPadding.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSAPrivateCrtKeyImpl.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSAPrivateKeyImpl.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSAPublicKeyImpl.java classlib6/core/src/openjdk/sun/sun/security/rsa/RSASignature.java classlib6/core/src/openjdk/sun/sun/security/rsa/SunRsaSign.java classlib6/core/src/openjdk/sun/sun/security/rsa/SunRsaSignEntries.java classlib6/core/src/openjdk/sun/sun/security/ssl/Alerts.java classlib6/core/src/openjdk/sun/sun/security/ssl/AppInputStream.java classlib6/core/src/openjdk/sun/sun/security/ssl/AppOutputStream.java classlib6/core/src/openjdk/sun/sun/security/ssl/BaseSSLSocketImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/ByteBufferInputStream.java classlib6/core/src/openjdk/sun/sun/security/ssl/CipherBox.java classlib6/core/src/openjdk/sun/sun/security/ssl/CipherSuite.java classlib6/core/src/openjdk/sun/sun/security/ssl/CipherSuiteList.java classlib6/core/src/openjdk/sun/sun/security/ssl/ClientHandshaker.java classlib6/core/src/openjdk/sun/sun/security/ssl/DHClientKeyExchange.java classlib6/core/src/openjdk/sun/sun/security/ssl/DHCrypt.java classlib6/core/src/openjdk/sun/sun/security/ssl/Debug.java classlib6/core/src/openjdk/sun/sun/security/ssl/DefaultSSLContextImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/ECDHClientKeyExchange.java classlib6/core/src/openjdk/sun/sun/security/ssl/ECDHCrypt.java classlib6/core/src/openjdk/sun/sun/security/ssl/EngineArgs.java classlib6/core/src/openjdk/sun/sun/security/ssl/EngineInputRecord.java classlib6/core/src/openjdk/sun/sun/security/ssl/EngineOutputRecord.java classlib6/core/src/openjdk/sun/sun/security/ssl/EngineWriter.java classlib6/core/src/openjdk/sun/sun/security/ssl/EphemeralKeyManager.java classlib6/core/src/openjdk/sun/sun/security/ssl/HandshakeHash.java classlib6/core/src/openjdk/sun/sun/security/ssl/HandshakeInStream.java classlib6/core/src/openjdk/sun/sun/security/ssl/HandshakeMessage.java classlib6/core/src/openjdk/sun/sun/security/ssl/HandshakeOutStream.java classlib6/core/src/openjdk/sun/sun/security/ssl/Handshaker.java classlib6/core/src/openjdk/sun/sun/security/ssl/HelloExtensions.java classlib6/core/src/openjdk/sun/sun/security/ssl/InputRecord.java classlib6/core/src/openjdk/sun/sun/security/ssl/JsseJce.java classlib6/core/src/openjdk/sun/sun/security/ssl/KerberosClientKeyExchange.java classlib6/core/src/openjdk/sun/sun/security/ssl/KerberosPreMasterSecret.java classlib6/core/src/openjdk/sun/sun/security/ssl/KeyManagerFactoryImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/MAC.java classlib6/core/src/openjdk/sun/sun/security/ssl/OutputRecord.java classlib6/core/src/openjdk/sun/sun/security/ssl/ProtocolList.java classlib6/core/src/openjdk/sun/sun/security/ssl/ProtocolVersion.java classlib6/core/src/openjdk/sun/sun/security/ssl/RSAClientKeyExchange.java classlib6/core/src/openjdk/sun/sun/security/ssl/RSASignature.java classlib6/core/src/openjdk/sun/sun/security/ssl/RandomCookie.java classlib6/core/src/openjdk/sun/sun/security/ssl/Record.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLContextImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLEngineImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLServerSocketFactoryImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLServerSocketImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLSessionContextImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLSessionImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLSocketFactoryImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLSocketImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/ServerHandshaker.java classlib6/core/src/openjdk/sun/sun/security/ssl/SessionId.java classlib6/core/src/openjdk/sun/sun/security/ssl/SunJSSE.java classlib6/core/src/openjdk/sun/sun/security/ssl/SunX509KeyManagerImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/TrustManagerFactoryImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/X509KeyManagerImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/X509TrustManagerImpl.java classlib6/core/src/openjdk/sun/sun/security/timestamp/HttpTimestamper.java classlib6/core/src/openjdk/sun/sun/security/timestamp/TSRequest.java classlib6/core/src/openjdk/sun/sun/security/timestamp/TSResponse.java classlib6/core/src/openjdk/sun/sun/security/timestamp/TimestampToken.java classlib6/core/src/openjdk/sun/sun/security/timestamp/Timestamper.java classlib6/core/src/openjdk/sun/sun/security/tools/JarSigner.java classlib6/core/src/openjdk/sun/sun/security/tools/JarSignerResources.java classlib6/core/src/openjdk/sun/sun/security/tools/JarSignerResources_ja.java classlib6/core/src/openjdk/sun/sun/security/tools/KeyTool.java classlib6/core/src/openjdk/sun/sun/security/tools/PolicyTool.java classlib6/core/src/openjdk/sun/sun/security/tools/TimestampedSigner.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_de.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_es.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_fr.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_it.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_ja.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_ko.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_sv.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_zh_CN.java classlib6/core/src/openjdk/sun/sun/security/util/AuthResources_zh_TW.java classlib6/core/src/openjdk/sun/sun/security/util/BigInt.java classlib6/core/src/openjdk/sun/sun/security/util/BitArray.java classlib6/core/src/openjdk/sun/sun/security/util/ByteArrayLexOrder.java classlib6/core/src/openjdk/sun/sun/security/util/ByteArrayTagOrder.java classlib6/core/src/openjdk/sun/sun/security/util/Cache.java classlib6/core/src/openjdk/sun/sun/security/util/Debug.java classlib6/core/src/openjdk/sun/sun/security/util/DerEncoder.java classlib6/core/src/openjdk/sun/sun/security/util/DerIndefLenConverter.java classlib6/core/src/openjdk/sun/sun/security/util/DerInputBuffer.java classlib6/core/src/openjdk/sun/sun/security/util/DerInputStream.java classlib6/core/src/openjdk/sun/sun/security/util/DerOutputStream.java classlib6/core/src/openjdk/sun/sun/security/util/DerValue.java classlib6/core/src/openjdk/sun/sun/security/util/HostnameChecker.java classlib6/core/src/openjdk/sun/sun/security/util/ManifestDigester.java classlib6/core/src/openjdk/sun/sun/security/util/ManifestEntryVerifier.java classlib6/core/src/openjdk/sun/sun/security/util/ObjectIdentifier.java classlib6/core/src/openjdk/sun/sun/security/util/Password.java classlib6/core/src/openjdk/sun/sun/security/util/PathList.java classlib6/core/src/openjdk/sun/sun/security/util/PendingException.java classlib6/core/src/openjdk/sun/sun/security/util/PolicyUtil.java classlib6/core/src/openjdk/sun/sun/security/util/PropertyExpander.java classlib6/core/src/openjdk/sun/sun/security/util/Resources.java classlib6/core/src/openjdk/sun/sun/security/util/ResourcesMgr.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_de.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_es.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_fr.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_it.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_ja.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_ko.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_sv.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_zh_CN.java classlib6/core/src/openjdk/sun/sun/security/util/Resources_zh_TW.java classlib6/core/src/openjdk/sun/sun/security/util/SecurityConstants.java classlib6/core/src/openjdk/sun/sun/security/util/SignatureFileVerifier.java classlib6/core/src/openjdk/sun/sun/security/validator/EndEntityChecker.java classlib6/core/src/openjdk/sun/sun/security/validator/KeyStores.java classlib6/core/src/openjdk/sun/sun/security/validator/PKIXValidator.java classlib6/core/src/openjdk/sun/sun/security/validator/SimpleValidator.java classlib6/core/src/openjdk/sun/sun/security/validator/Validator.java classlib6/core/src/openjdk/sun/sun/security/validator/ValidatorException.java classlib6/core/src/openjdk/sun/sun/security/x509/AVA.java classlib6/core/src/openjdk/sun/sun/security/x509/AccessDescription.java classlib6/core/src/openjdk/sun/sun/security/x509/AlgIdDSA.java classlib6/core/src/openjdk/sun/sun/security/x509/AlgorithmId.java classlib6/core/src/openjdk/sun/sun/security/x509/AttributeNameEnumeration.java classlib6/core/src/openjdk/sun/sun/security/x509/AuthorityInfoAccessExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/AuthorityKeyIdentifierExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/BasicConstraintsExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/CRLDistributionPointsExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/CRLExtensions.java classlib6/core/src/openjdk/sun/sun/security/x509/CRLNumberExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/CRLReasonCodeExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/CertAndKeyGen.java classlib6/core/src/openjdk/sun/sun/security/x509/CertAttrSet.java classlib6/core/src/openjdk/sun/sun/security/x509/CertException.java classlib6/core/src/openjdk/sun/sun/security/x509/CertParseError.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateAlgorithmId.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateExtensions.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateIssuerExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateIssuerName.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateIssuerUniqueIdentity.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificatePoliciesExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificatePolicyId.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificatePolicyMap.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificatePolicySet.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateSerialNumber.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateSubjectName.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateSubjectUniqueIdentity.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateValidity.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateVersion.java classlib6/core/src/openjdk/sun/sun/security/x509/CertificateX509Key.java classlib6/core/src/openjdk/sun/sun/security/x509/DNSName.java classlib6/core/src/openjdk/sun/sun/security/x509/DistributionPoint.java classlib6/core/src/openjdk/sun/sun/security/x509/EDIPartyName.java classlib6/core/src/openjdk/sun/sun/security/x509/ExtendedKeyUsageExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/Extension.java classlib6/core/src/openjdk/sun/sun/security/x509/GeneralName.java classlib6/core/src/openjdk/sun/sun/security/x509/GeneralNameInterface.java classlib6/core/src/openjdk/sun/sun/security/x509/GeneralNames.java classlib6/core/src/openjdk/sun/sun/security/x509/GeneralSubtree.java classlib6/core/src/openjdk/sun/sun/security/x509/GeneralSubtrees.java classlib6/core/src/openjdk/sun/sun/security/x509/IPAddressName.java classlib6/core/src/openjdk/sun/sun/security/x509/InhibitAnyPolicyExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/IssuerAlternativeNameExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/KeyIdentifier.java classlib6/core/src/openjdk/sun/sun/security/x509/KeyUsageExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/NameConstraintsExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/NetscapeCertTypeExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/OIDMap.java classlib6/core/src/openjdk/sun/sun/security/x509/OIDName.java classlib6/core/src/openjdk/sun/sun/security/x509/OtherName.java classlib6/core/src/openjdk/sun/sun/security/x509/PKIXExtensions.java classlib6/core/src/openjdk/sun/sun/security/x509/PolicyConstraintsExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/PolicyInformation.java classlib6/core/src/openjdk/sun/sun/security/x509/PolicyMappingsExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/PrivateKeyUsageExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/RDN.java classlib6/core/src/openjdk/sun/sun/security/x509/RFC822Name.java classlib6/core/src/openjdk/sun/sun/security/x509/ReasonFlags.java classlib6/core/src/openjdk/sun/sun/security/x509/SerialNumber.java classlib6/core/src/openjdk/sun/sun/security/x509/SubjectAlternativeNameExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/SubjectKeyIdentifierExtension.java classlib6/core/src/openjdk/sun/sun/security/x509/URIName.java classlib6/core/src/openjdk/sun/sun/security/x509/UniqueIdentity.java classlib6/core/src/openjdk/sun/sun/security/x509/X400Address.java classlib6/core/src/openjdk/sun/sun/security/x509/X500Name.java classlib6/core/src/openjdk/sun/sun/security/x509/X500Signer.java classlib6/core/src/openjdk/sun/sun/security/x509/X509AttributeName.java classlib6/core/src/openjdk/sun/sun/security/x509/X509CRLEntryImpl.java classlib6/core/src/openjdk/sun/sun/security/x509/X509CRLImpl.java classlib6/core/src/openjdk/sun/sun/security/x509/X509Cert.java classlib6/core/src/openjdk/sun/sun/security/x509/X509CertImpl.java classlib6/core/src/openjdk/sun/sun/security/x509/X509CertInfo.java classlib6/core/src/openjdk/sun/sun/security/x509/X509Key.java Added Paths: ----------- classlib6/core/src/openjdk/sun/sun/security/action/GetBooleanSecurityPropertyAction.java classlib6/core/src/openjdk/sun/sun/security/action/OpenFileInputStreamAction.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/AlgorithmChecker.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/OCSP.java Added: classlib6/core/src/openjdk/sun/sun/security/action/GetBooleanSecurityPropertyAction.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/action/GetBooleanSecurityPropertyAction.java (rev 0) +++ classlib6/core/src/openjdk/sun/sun/security/action/GetBooleanSecurityPropertyAction.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2010, 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.security.action; + +import java.security.Security; + +/** + * A convenience class for retrieving the boolean value of a security property + * as a privileged action. + * + * <p>An instance of this class can be used as the argument of + * <code>AccessController.doPrivileged</code>. + * + * <p>The following code retrieves the boolean value of the security + * property named <code>"prop"</code> as a privileged action: <p> + * + * <pre> + * boolean b = java.security.AccessController.doPrivileged + * (new GetBooleanSecurityPropertyAction("prop")).booleanValue(); + * </pre> + * + */ +public class GetBooleanSecurityPropertyAction + implements java.security.PrivilegedAction<Boolean> { + private String theProp; + + /** + * Constructor that takes the name of the security property whose boolean + * value needs to be determined. + * + * @param theProp the name of the security property + */ + public GetBooleanSecurityPropertyAction(String theProp) { + this.theProp = theProp; + } + + /** + * Determines the boolean value of the security property whose name was + * specified in the constructor. + * + * @return the <code>Boolean</code> value of the security property. + */ + public Boolean run() { + boolean b = false; + try { + String value = Security.getProperty(theProp); + b = (value != null) && value.equalsIgnoreCase("true"); + } catch (NullPointerException e) {} + return b; + } +} Added: classlib6/core/src/openjdk/sun/sun/security/action/OpenFileInputStreamAction.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/action/OpenFileInputStreamAction.java (rev 0) +++ classlib6/core/src/openjdk/sun/sun/security/action/OpenFileInputStreamAction.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002, 2004, 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.security.action; + +import java.io.*; + +import java.security.PrivilegedExceptionAction; + +/** + * A convenience class for opening a FileInputStream as a privileged action. + * + * @author Andreas Sterbenz + */ +public class OpenFileInputStreamAction + implements PrivilegedExceptionAction<FileInputStream> { + + private final File file; + + public OpenFileInputStreamAction(File file) { + this.file = file; + } + + public OpenFileInputStreamAction(String filename) { + this.file = new File(filename); + } + + public FileInputStream run() throws Exception { + return new FileInputStream(file); + } +} Modified: classlib6/core/src/openjdk/sun/sun/security/jgss/krb5/InitialToken.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/jgss/krb5/InitialToken.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/jgss/krb5/InitialToken.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, 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 @@ -209,6 +209,12 @@ int pos = 0; + if (checksum == null) { + GSSException ge = new GSSException(GSSException.FAILURE, -1, + "No cksum in AP_REQ's authenticator"); + ge.initCause(new KrbException(Krb5.KRB_AP_ERR_INAPP_CKSUM)); + throw ge; + } checksumBytes = checksum.getBytes(); if ((checksumBytes[0] != CHECKSUM_FIRST_BYTES[0]) || Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/Config.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/Config.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/Config.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/JarVerifier.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/JarVerifier.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/JarVerifier.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/KeyCache.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/KeyCache.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/KeyCache.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Cipher.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Cipher.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Cipher.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 2010, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; @@ -127,7 +127,6 @@ // XXX change default to PKCS5Padding paddingType = PAD_NONE; } - session = token.getOpSession(); } protected void engineSetMode(String mode) throws NoSuchAlgorithmException { @@ -654,16 +653,4 @@ (token, key, keyAlgorithm).keyLength(); return n; } - - protected void finalize() throws Throwable { - try { - if ((session != null) && token.isValid()) { - cancelOperation(); - session = token.releaseSession(session); - } - } finally { - super.finalize(); - } - } - } Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DHKeyFactory.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DHKeyFactory.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DHKeyFactory.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DSAKeyFactory.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DSAKeyFactory.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11DSAKeyFactory.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Digest.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Digest.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Digest.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 2010, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; @@ -308,16 +308,4 @@ throw new ProviderException("update() failed", e); } } - - protected void finalize() throws Throwable { - try { - if ((session != null) && token.isValid()) { - cancelOperation(); - session = token.releaseSession(session); - } - } finally { - super.finalize(); - } - } - } Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECDHKeyAgreement.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECDHKeyAgreement.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECDHKeyAgreement.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECKeyFactory.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECKeyFactory.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11ECKeyFactory.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2006, 2010, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; @@ -40,6 +40,8 @@ import sun.security.pkcs11.wrapper.*; import static sun.security.pkcs11.wrapper.PKCS11Constants.*; +import sun.security.util.DerValue; + /** * EC KeyFactory implemenation. * @@ -201,7 +203,16 @@ private PublicKey generatePublic(ECPoint point, ECParameterSpec params) throws PKCS11Exception { byte[] encodedParams = ECParameters.encodeParameters(params); - byte[] encodedPoint = ECParameters.encodePoint(point, params.getCurve()); + byte[] encodedPoint = null; + DerValue pkECPoint = new DerValue(DerValue.tag_OctetString, + ECParameters.encodePoint(point, params.getCurve())); + + try { + encodedPoint = pkECPoint.toByteArray(); + } catch (IOException e) { + throw new IllegalArgumentException("Could not DER encode point", e); + } + CK_ATTRIBUTE[] attributes = new CK_ATTRIBUTE[] { new CK_ATTRIBUTE(CKA_CLASS, CKO_PUBLIC_KEY), new CK_ATTRIBUTE(CKA_KEY_TYPE, CKK_EC), Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Key.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Key.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11Key.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 2010, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,14 +18,15 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; import java.io.*; +import java.lang.ref.*; import java.math.BigInteger; import java.util.*; @@ -44,6 +45,8 @@ import sun.security.pkcs11.wrapper.*; import static sun.security.pkcs11.wrapper.PKCS11Constants.*; +import sun.security.util.DerValue; + /** * Key implementation classes. * @@ -67,9 +70,6 @@ // type of key, one of (PUBLIC, PRIVATE, SECRET) final String type; - // session in which the key was created, relevant for session objects - final Session session; - // token instance final Token token; @@ -85,10 +85,12 @@ // flags indicating whether the key is a token object, sensitive, extractable final boolean tokenObject, sensitive, extractable; + // phantom reference notification clean up for session keys + private final SessionKeyRef sessionKeyRef; + P11Key(String type, Session session, long keyID, String algorithm, int keyLength, CK_ATTRIBUTE[] attributes) { this.type = type; - this.session = session; this.token = session.token; this.keyID = keyID; this.algorithm = algorithm; @@ -111,7 +113,9 @@ this.sensitive = sensitive; this.extractable = extractable; if (tokenObject == false) { - session.addObject(); + sessionKeyRef = new SessionKeyRef(this, keyID, session); + } else { + sessionKeyRef = null; } } @@ -236,24 +240,6 @@ } } - protected void finalize() throws Throwable { - if (tokenObject || (token.isValid() == false)) { - super.finalize(); - return; - } - Session newSession = null; - try { - newSession = token.getOpSession(); - token.p11.C_DestroyObject(newSession.id(), keyID); - } catch (PKCS11Exception e) { - // ignore - } finally { - token.releaseSession(newSession); - session.removeObject(); - super.finalize(); - } - } - private final static CK_ATTRIBUTE[] A0 = new CK_ATTRIBUTE[0]; private static CK_ATTRIBUTE[] getAttributes(Session session, long keyID, @@ -1016,8 +1002,16 @@ try { params = P11ECKeyFactory.decodeParameters (attributes[1].getByteArray()); + DerValue wECPoint = new DerValue(attributes[0].getByteArray()); + if (wECPoint.getTag() != DerValue.tag_OctetString) + throw new IOException("Unexpected tag: " + + wECPoint.getTag()); + params = P11ECKeyFactory.decodeParameters + (attributes[1].getByteArray()); w = P11ECKeyFactory.decodePoint - (attributes[0].getByteArray(), params.getCurve()); + (wECPoint.getDataBytes(), params.getCurve()); + + } catch (Exception e) { throw new RuntimeException("Could not parse key values", e); } @@ -1055,5 +1049,68 @@ + "\n parameters: " + params; } } +} +/* + * NOTE: Must use PhantomReference here and not WeakReference + * otherwise the key maybe cleared before other objects which + * still use these keys during finalization such as SSLSocket. + */ +final class SessionKeyRef extends PhantomReference<P11Key> + implements Comparable<SessionKeyRef> { + private static ReferenceQueue<P11Key> refQueue = + new ReferenceQueue<P11Key>(); + private static Set<SessionKeyRef> refList = + Collections.synchronizedSortedSet(new TreeSet<SessionKeyRef>()); + + static ReferenceQueue<P11Key> referenceQueue() { + return refQueue; + } + + private static void drainRefQueueBounded() { + while (true) { + SessionKeyRef next = (SessionKeyRef) refQueue.poll(); + if (next == null) break; + next.dispose(); + } + } + + // handle to the native key + private long keyID; + private Session session; + + SessionKeyRef(P11Key key , long keyID, Session session) { + super(key, refQueue); + this.keyID = keyID; + this.session = session; + this.session.addObject(); + refList.add(this); + // TBD: run at some interval and not every time? + drainRefQueueBounded(); + } + + private void dispose() { + refList.remove(this); + if (session.token.isValid()) { + Session newSession = null; + try { + newSession = session.token.getOpSession(); + session.token.p11.C_DestroyObject(newSession.id(), keyID); + } catch (PKCS11Exception e) { + // ignore + } finally { + this.clear(); + session.token.releaseSession(newSession); + session.removeObject(); + } + } + } + + public int compareTo(SessionKeyRef other) { + if (this.keyID == other.keyID) { + return 0; + } else { + return (this.keyID < other.keyID) ? -1 : 1; + } + } } Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyAgreement.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyAgreement.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyAgreement.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyFactory.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyFactory.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyFactory.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyGenerator.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyGenerator.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyGenerator.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.security.pkcs11; Modified: classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyPairGenerator.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyPairGenerator.java 2011-03-05 13:01:15 UTC (rev 5802) +++ classlib6/core/src/openjdk/sun/sun/security/pkcs11/P11KeyPairGenerator.java 2011-03-05 13:13:50 UTC (rev 5803) @@ -1,12 +1,12 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 2008, 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. Sun designates this + * publ... [truncated message content] |
From: <ls...@us...> - 2011-03-05 13:01:25
|
Revision: 5802 http://jnode.svn.sourceforge.net/jnode/?rev=5802&view=rev Author: lsantha Date: 2011-03-05 13:01:15 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/sun/sun/awt/SunToolkit.java classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDragSourceContextPeer.java classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetContextPeer.java classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetEvent.java classlib6/core/src/openjdk/sun/sun/awt/image/BadDepthException.java classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceData.java classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceManager.java classlib6/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageDevice.java classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageGraphicsConfig.java classlib6/core/src/openjdk/sun/sun/awt/image/ByteArrayImageSource.java classlib6/core/src/openjdk/sun/sun/awt/image/ByteBandedRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/ByteComponentRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/ByteInterleavedRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/BytePackedRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/DataBufferNative.java classlib6/core/src/openjdk/sun/sun/awt/image/FileImageSource.java classlib6/core/src/openjdk/sun/sun/awt/image/GifImageDecoder.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageAccessException.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageConsumerQueue.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageDecoder.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetchable.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetcher.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageFormatException.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageRepresentation.java classlib6/core/src/openjdk/sun/sun/awt/image/ImageWatched.java classlib6/core/src/openjdk/sun/sun/awt/image/ImagingLib.java classlib6/core/src/openjdk/sun/sun/awt/image/InputStreamImageSource.java classlib6/core/src/openjdk/sun/sun/awt/image/IntegerComponentRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/IntegerInterleavedRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/JPEGImageDecoder.java classlib6/core/src/openjdk/sun/sun/awt/image/NativeLibLoader.java classlib6/core/src/openjdk/sun/sun/awt/image/OffScreenImage.java classlib6/core/src/openjdk/sun/sun/awt/image/OffScreenImageSource.java classlib6/core/src/openjdk/sun/sun/awt/image/PNGImageDecoder.java classlib6/core/src/openjdk/sun/sun/awt/image/PixelConverter.java classlib6/core/src/openjdk/sun/sun/awt/image/ShortBandedRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/ShortComponentRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/ShortInterleavedRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/SunVolatileImage.java classlib6/core/src/openjdk/sun/sun/awt/image/SunWritableRaster.java classlib6/core/src/openjdk/sun/sun/awt/image/SurfaceManager.java classlib6/core/src/openjdk/sun/sun/awt/image/ToolkitImage.java classlib6/core/src/openjdk/sun/sun/awt/image/VolatileSurfaceManager.java classlib6/core/src/openjdk/sun/sun/awt/image/WritableRasterNative.java classlib6/core/src/openjdk/sun/sun/awt/image/XbmImageDecoder.java classlib6/core/src/openjdk/sun/sun/corba/Bridge.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/Dasher.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/LineSink.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/PiscesCache.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/PiscesMath.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/PiscesRenderingEngine.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/PiscesTileGenerator.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/Renderer.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/Stroker.java classlib6/core/src/openjdk/sun/sun/java2d/pisces/Transform4.java classlib6/core/src/openjdk/sun/sun/management/jmxremote/ConnectorBootstrap.java classlib6/core/src/openjdk/sun/sun/management/jmxremote/LocalRMIServerSocketFactory.java classlib6/core/src/openjdk/sun/sun/management/jmxremote/SSLContextRMIServerSocketFactory.java classlib6/core/src/openjdk/sun/sun/management/jmxremote/SingleEntryRegistry.java classlib6/core/src/openjdk/sun/sun/management/jmxremote/package.html classlib6/core/src/openjdk/sun/sun/management/resources/agent.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_de.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_es.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_fr.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_it.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_ja.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_ko.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_sv.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_zh_CN.properties classlib6/core/src/openjdk/sun/sun/management/resources/agent_zh_TW.properties classlib6/core/src/openjdk/sun/sun/misc/ASCIICaseInsensitiveComparator.java classlib6/core/src/openjdk/sun/sun/misc/BASE64Decoder.java classlib6/core/src/openjdk/sun/sun/misc/BASE64Encoder.java classlib6/core/src/openjdk/sun/sun/misc/CEFormatException.java classlib6/core/src/openjdk/sun/sun/misc/CEStreamExhausted.java classlib6/core/src/openjdk/sun/sun/misc/CRC16.java classlib6/core/src/openjdk/sun/sun/misc/Cache.java classlib6/core/src/openjdk/sun/sun/misc/CharacterDecoder.java classlib6/core/src/openjdk/sun/sun/misc/CharacterEncoder.java classlib6/core/src/openjdk/sun/sun/misc/ClassFileTransformer.java classlib6/core/src/openjdk/sun/sun/misc/ClassLoaderUtil.java classlib6/core/src/openjdk/sun/sun/misc/Cleaner.java classlib6/core/src/openjdk/sun/sun/misc/Compare.java classlib6/core/src/openjdk/sun/sun/misc/CompoundEnumeration.java classlib6/core/src/openjdk/sun/sun/misc/ConditionLock.java classlib6/core/src/openjdk/sun/sun/misc/DoubleConsts.java classlib6/core/src/openjdk/sun/sun/misc/ExtensionDependency.java classlib6/core/src/openjdk/sun/sun/misc/ExtensionInfo.java classlib6/core/src/openjdk/sun/sun/misc/ExtensionInstallationException.java classlib6/core/src/openjdk/sun/sun/misc/ExtensionInstallationProvider.java classlib6/core/src/openjdk/sun/sun/misc/FloatConsts.java classlib6/core/src/openjdk/sun/sun/misc/FloatingDecimal.java classlib6/core/src/openjdk/sun/sun/misc/FormattedFloatingDecimal.java classlib6/core/src/openjdk/sun/sun/misc/FpUtils.java classlib6/core/src/openjdk/sun/sun/misc/GC.java classlib6/core/src/openjdk/sun/sun/misc/HexDumpEncoder.java classlib6/core/src/openjdk/sun/sun/misc/InvalidJarIndexException.java classlib6/core/src/openjdk/sun/sun/misc/JarFilter.java classlib6/core/src/openjdk/sun/sun/misc/JarIndex.java classlib6/core/src/openjdk/sun/sun/misc/JavaIOFileDescriptorAccess.java classlib6/core/src/openjdk/sun/sun/misc/JavaLangAccess.java classlib6/core/src/openjdk/sun/sun/misc/JavaNetAccess.java classlib6/core/src/openjdk/sun/sun/misc/JavaUtilJarAccess.java classlib6/core/src/openjdk/sun/sun/misc/LRUCache.java classlib6/core/src/openjdk/sun/sun/misc/Launcher.java classlib6/core/src/openjdk/sun/sun/misc/Lock.java classlib6/core/src/openjdk/sun/sun/misc/MessageUtils.java classlib6/core/src/openjdk/sun/sun/misc/NativeSignalHandler.java classlib6/core/src/openjdk/sun/sun/misc/Perf.java classlib6/core/src/openjdk/sun/sun/misc/PerformanceLogger.java classlib6/core/src/openjdk/sun/sun/misc/ProxyGenerator.java classlib6/core/src/openjdk/sun/sun/misc/Queue.java classlib6/core/src/openjdk/sun/sun/misc/REException.java classlib6/core/src/openjdk/sun/sun/misc/Ref.java classlib6/core/src/openjdk/sun/sun/misc/Regexp.java classlib6/core/src/openjdk/sun/sun/misc/RegexpPool.java classlib6/core/src/openjdk/sun/sun/misc/RegexpTarget.java classlib6/core/src/openjdk/sun/sun/misc/Request.java classlib6/core/src/openjdk/sun/sun/misc/RequestProcessor.java classlib6/core/src/openjdk/sun/sun/misc/Resource.java classlib6/core/src/openjdk/sun/sun/misc/Service.java classlib6/core/src/openjdk/sun/sun/misc/ServiceConfigurationError.java classlib6/core/src/openjdk/sun/sun/misc/SharedSecrets.java classlib6/core/src/openjdk/sun/sun/misc/Signal.java classlib6/core/src/openjdk/sun/sun/misc/SignalHandler.java classlib6/core/src/openjdk/sun/sun/misc/SoftCache.java classlib6/core/src/openjdk/sun/sun/misc/Sort.java classlib6/core/src/openjdk/sun/sun/misc/Timeable.java classlib6/core/src/openjdk/sun/sun/misc/Timer.java classlib6/core/src/openjdk/sun/sun/misc/UCDecoder.java classlib6/core/src/openjdk/sun/sun/misc/UCEncoder.java classlib6/core/src/openjdk/sun/sun/misc/URLClassPath.java classlib6/core/src/openjdk/sun/sun/misc/UUDecoder.java classlib6/core/src/openjdk/sun/sun/misc/UUEncoder.java classlib6/core/src/openjdk/sun/sun/misc/Unsafe.java classlib6/core/src/openjdk/sun/sun/misc/VM.java classlib6/core/src/openjdk/sun/sun/misc/VMNotification.java classlib6/core/src/openjdk/sun/sun/net/NetworkClient.java classlib6/core/src/openjdk/sun/sun/net/www/MessageHeader.java classlib6/core/src/openjdk/sun/sun/reflect/misc/MethodUtil.java classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_de.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_es.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_fr.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_it.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_ja.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_ko.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_sv.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_zh_CN.properties classlib6/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_zh_TW.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_de.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_es.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_fr.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_it.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_ja.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_ko.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_sv.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_zh_CN.properties classlib6/core/src/openjdk/sun/sun/rmi/server/resources/rmid_zh_TW.properties Added Paths: ----------- classlib6/core/src/openjdk/sun/sun/awt/AWTAccessor.java classlib6/core/src/openjdk/sun/sun/misc/JavaSecurityAccess.java classlib6/core/src/openjdk/sun/sun/rmi/server/Activation.java Added: classlib6/core/src/openjdk/sun/sun/awt/AWTAccessor.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/AWTAccessor.java (rev 0) +++ classlib6/core/src/openjdk/sun/sun/awt/AWTAccessor.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2011, 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; + +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; + +/** + * The AWTAccessor utility class. + * The main purpose of this class is to enable accessing + * private and package-private fields of classes from + * different classes/packages. See sun.misc.SharedSecretes + * for another example. + */ +public final class AWTAccessor { + + private static final Unsafe unsafe = Unsafe.getUnsafe(); + + /* + * We don't need any objects of this class. + * It's rather a collection of static methods + * and interfaces. + */ + private AWTAccessor() { + } + + /* + * An interface of accessor for the java.awt.Component class. + */ + public interface ComponentAccessor { + /* + * Returns the acc this component was constructed with. + */ + AccessControlContext getAccessControlContext(Component comp); + } + + /* + * An accessor for the AWTEvent class. + */ + public interface AWTEventAccessor { + /** + * Sets the flag on this AWTEvent indicating that it was + * generated by the system. + */ + void setSystemGenerated(AWTEvent ev); + + /** + * Indicates whether this AWTEvent was generated by the system. + */ + boolean isSystemGenerated(AWTEvent ev); + + + /* + * Returns the acc this event was constructed with. + */ + AccessControlContext getAccessControlContext(AWTEvent ev); + + } + + /* + * Accessor instances are initialized in the static initializers of + * corresponding AWT classes by using setters defined below. + */ + private static ComponentAccessor componentAccessor; + private static AWTEventAccessor awtEventAccessor; + + /* + * Set an accessor object for the java.awt.Component class. + */ + public static void setComponentAccessor(ComponentAccessor ca) { + componentAccessor = ca; + } + + /* + * Retrieve the accessor object for the java.awt.Component class. + */ + public static ComponentAccessor getComponentAccessor() { + if (componentAccessor == null) { + unsafe.ensureClassInitialized(Component.class); + } + + return componentAccessor; + } + + /* + * Set an accessor object for the java.awt.AWTEvent class. + */ + public static void setAWTEventAccessor(AWTEventAccessor aea) { + awtEventAccessor = aea; + } + + /* + * Retrieve the accessor object for the java.awt.AWTEvent class. + */ + public static AWTEventAccessor getAWTEventAccessor() { + if (awtEventAccessor == null) { + unsafe.ensureClassInitialized(AWTEvent.class); + } + return awtEventAccessor; + } +} Modified: classlib6/core/src/openjdk/sun/sun/awt/SunToolkit.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/SunToolkit.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/SunToolkit.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 2008, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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; @@ -859,6 +859,15 @@ return AccessController.doPrivileged(new GetBooleanAction("sun.awt.erasebackgroundonresize")); } + + /** + * Makes the window OverrideRedirect, on X11 platforms. See + * ICCCM specification for more details about OverrideRedirect + * windows. Implemented in XToolkit, no-op in WToolkit. + */ + public void setOverrideRedirect(Window target) { + } + static SoftCache imgCache = new SoftCache(); static synchronized Image getImageFromHash(Toolkit tk, URL url) { Modified: classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDragSourceContextPeer.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDragSourceContextPeer.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDragSourceContextPeer.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.dnd; Modified: classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetContextPeer.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetContextPeer.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetContextPeer.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2010, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.dnd; @@ -57,6 +57,7 @@ import sun.awt.SunToolkit; import sun.awt.datatransfer.DataTransferer; import sun.awt.datatransfer.ToolkitThreadBlockedHandler; +import sun.security.util.SecurityConstants; /** * <p> @@ -216,6 +217,17 @@ throws UnsupportedFlavorException, IOException, InvalidDnDOperationException { + SecurityManager sm = System.getSecurityManager(); + try { + if (!dropComplete && sm != null) { + sm.checkSystemClipboardAccess(); + } + } catch (Exception e) { + Thread currentThread = Thread.currentThread(); + currentThread.getUncaughtExceptionHandler().uncaughtException(currentThread, e); + return null; + } + Long lFormat = null; Transferable localTransferable = local; Modified: classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetEvent.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetEvent.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetEvent.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.dnd; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/BadDepthException.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/BadDepthException.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/BadDepthException.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1995 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceData.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceData.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceData.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 2010, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; @@ -49,7 +49,7 @@ private BufferedImageGraphicsConfig graphicsConfig; RenderLoops solidloops; - private static native void initIDs(Class ICM); + private static native void initIDs(Class ICM, Class ICMColorData); private static final int DCM_RGBX_RED_MASK = 0xff000000; private static final int DCM_RGBX_GREEN_MASK = 0x00ff0000; @@ -67,7 +67,7 @@ private static final int DCM_ARGBBM_BLUE_MASK = 0x000000ff; static { - initIDs(IndexColorModel.class); + initIDs(IndexColorModel.class, ICMColorData.class); } public static SurfaceData createData(BufferedImage bufImg) { @@ -403,7 +403,7 @@ // their pixels are immediately retrievable anyway. } - public static native void freeNativeICMData(IndexColorModel icm); + private static native void freeNativeICMData(long pData); /** * Returns destination Image associated with this SurfaceData. @@ -411,4 +411,19 @@ public Object getDestination() { return bufImg; } + + public static final class ICMColorData { + private long pData = 0L; + + private ICMColorData(long pData) { + this.pData = pData; + } + + public void finalize() { + if (pData != 0L) { + BufImgSurfaceData.freeNativeICMData(pData); + pData = 0L; + } + } + } } Modified: classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceManager.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceManager.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceManager.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageDevice.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageDevice.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageDevice.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageGraphicsConfig.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageGraphicsConfig.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/BufferedImageGraphicsConfig.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ByteArrayImageSource.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ByteArrayImageSource.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ByteArrayImageSource.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1996 Sun Microsystems, Inc. All Rights Reserved. + * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ByteBandedRaster.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ByteBandedRaster.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ByteBandedRaster.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ByteComponentRaster.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ByteComponentRaster.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ByteComponentRaster.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ByteInterleavedRaster.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ByteInterleavedRaster.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ByteInterleavedRaster.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/BytePackedRaster.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/BytePackedRaster.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/BytePackedRaster.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/DataBufferNative.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/DataBufferNative.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/DataBufferNative.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2001, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ Modified: classlib6/core/src/openjdk/sun/sun/awt/image/FileImageSource.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/FileImageSource.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/FileImageSource.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1995-1996 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/GifImageDecoder.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/GifImageDecoder.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/GifImageDecoder.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -585,9 +585,16 @@ System.out.print("Reading a " + width + " by " + height + " " + (interlace ? "" : "non-") + "interlaced image..."); } - + int initCodeSize = ExtractByte(block, 9); + if (initCodeSize >= 12) { + if (verbose) { + System.out.println("Invalid initial code size: " + + initCodeSize); + } + return false; + } boolean ret = parseImage(x, y, width, height, - interlace, ExtractByte(block, 9), + interlace, initCodeSize, block, rasline, model); if (!ret) { Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ImageAccessException.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ImageAccessException.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ImageAccessException.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1995 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ImageConsumerQueue.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ImageConsumerQueue.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ImageConsumerQueue.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ImageDecoder.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ImageDecoder.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ImageDecoder.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetchable.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetchable.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetchable.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2001, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetcher.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetcher.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ImageFetcher.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1995-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.image; Modified: classlib6/core/src/openjdk/sun/sun/awt/image/ImageFormatException.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/ImageFormatException.java 2011-03-05 11:39:52 UTC (rev 5801) +++ classlib6/core/src/openjdk/sun/sun/awt/image/ImageFormatException.java 2011-03-05 13:01:15 UTC (rev 5802) @@ -1,12 +1,12 @@ /* - * Copyright 1995 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1995, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional info... [truncated message content] |
From: <ls...@us...> - 2011-03-05 11:40:00
|
Revision: 5801 http://jnode.svn.sourceforge.net/jnode/?rev=5801&view=rev Author: lsantha Date: 2011-03-05 11:39:52 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Removed Paths: ------------- classlib6/core/src/openjdk/langtools/com/sun/tools/javac/resources/version.java classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/BaseFileObject.java classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/JavacFileManager.java classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/Old199.java classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/Paths.java classlib6/core/src/openjdk/langtools/com/sun/tools/javac/zip/ Deleted: classlib6/core/src/openjdk/langtools/com/sun/tools/javac/resources/version.java =================================================================== --- classlib6/core/src/openjdk/langtools/com/sun/tools/javac/resources/version.java 2011-03-05 11:38:17 UTC (rev 5800) +++ classlib6/core/src/openjdk/langtools/com/sun/tools/javac/resources/version.java 2011-03-05 11:39:52 UTC (rev 5801) @@ -1,18 +0,0 @@ -/* - * $Id$ - */ -package com.sun.tools.javac.resources; - -import java.util.ListResourceBundle; - -public final class version extends ListResourceBundle { - private static final Object[][] contents = { - { "jdk", "openjdk-1.6.0" }, - { "full", "openjdk-1.6.0-jnode" }, - { "release", "openjdk-1.6.0-jnode" }, - }; - - protected final Object[][] getContents() { - return contents; - } -} Deleted: classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/BaseFileObject.java =================================================================== --- classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/BaseFileObject.java 2011-03-05 11:38:17 UTC (rev 5800) +++ classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/BaseFileObject.java 2011-03-05 11:39:52 UTC (rev 5801) @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2005, 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 com.sun.tools.javac.util; - -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; -import java.nio.charset.CharsetDecoder; -import javax.lang.model.element.Modifier; -import javax.lang.model.element.NestingKind; -import javax.tools.JavaFileObject; - -import static javax.tools.JavaFileObject.Kind.*; - -public abstract class BaseFileObject implements JavaFileObject { - - public JavaFileObject.Kind getKind() { - String n = getName(); - if (n.endsWith(CLASS.extension)) - return CLASS; - else if (n.endsWith(SOURCE.extension)) - return SOURCE; - else if (n.endsWith(HTML.extension)) - return HTML; - else - return OTHER; - } - - @Override - public String toString() { - return getPath(); - } - - /** @deprecated see bug 6410637 */ - @Deprecated - public String getPath() { - return getName(); - } - - /** @deprecated see bug 6410637 */ - @Deprecated - abstract public String getName(); - - public NestingKind getNestingKind() { return null; } - - public Modifier getAccessLevel() { return null; } - - public Reader openReader(boolean ignoreEncodingErrors) throws IOException { - return new InputStreamReader(openInputStream(), getDecoder(ignoreEncodingErrors)); - } - - protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) { - throw new UnsupportedOperationException(); - } - -} Deleted: classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/JavacFileManager.java =================================================================== --- classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/JavacFileManager.java 2011-03-05 11:38:17 UTC (rev 5800) +++ classlib6/core/src/openjdk/langtools/com/sun/tools/javac/util/JavacFileManager.java 2011-03-05 11:39:52 UTC (rev 5801) @@ -1,1717 +0,0 @@ -/* - * Copyright (c) 2005, 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 com.sun.tools.javac.util; - -import com.sun.tools.javac.main.JavacOption; -import com.sun.tools.javac.main.OptionName; -import com.sun.tools.javac.main.RecognizedOptions; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.lang.ref.SoftReference; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.net.URLClassLoader; -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.channels.FileChannel; -import java.nio.charset.Charset; -import java.nio.charset.CharsetDecoder; -import java.nio.charset.CoderResult; -import java.nio.charset.CodingErrorAction; -import java.nio.charset.IllegalCharsetNameException; -import java.nio.charset.UnsupportedCharsetException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.EnumSet; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import javax.lang.model.SourceVersion; -import javax.tools.FileObject; -import javax.tools.JavaFileManager; -import javax.tools.JavaFileObject; - -import com.sun.tools.javac.code.Source; -import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; -import java.util.concurrent.ConcurrentHashMap; -import javax.tools.StandardJavaFileManager; - -import com.sun.tools.javac.zip.*; -import java.io.ByteArrayInputStream; - -import static com.sun.tools.javac.main.OptionName.*; -import static javax.tools.StandardLocation.*; - -/** - * This class provides access to the source, class and other files - * used by the compiler and related tools. - */ -public class JavacFileManager implements StandardJavaFileManager { - - private static final String[] symbolFileLocation = { "lib", "ct.sym" }; - private static final String symbolFilePrefix = "META-INF/sym/rt.jar/"; - - boolean useZipFileIndex; - - private static int symbolFilePrefixLength = 0; - static { - try { - symbolFilePrefixLength = symbolFilePrefix.getBytes("UTF-8").length; - } catch (java.io.UnsupportedEncodingException uee) { - // Can't happen...UTF-8 is always supported. - } - } - - private static boolean CHECK_ZIP_TIMESTAMP = false; - private static Map<File, Boolean> isDirectory = new ConcurrentHashMap<File, Boolean>(); - - - public static char[] toArray(CharBuffer buffer) { - if (buffer.hasArray()) - return ((CharBuffer)buffer.compact().flip()).array(); - else - return buffer.toString().toCharArray(); - } - - /** - * The log to be used for error reporting. - */ - protected Log log; - - /** Encapsulates knowledge of paths - */ - private Paths paths; - - private Options options; - - private final File uninited = new File("U N I N I T E D"); - - private final Set<JavaFileObject.Kind> sourceOrClass = - EnumSet.of(JavaFileObject.Kind.SOURCE, JavaFileObject.Kind.CLASS); - - /** The standard output directory, primarily used for classes. - * Initialized by the "-d" option. - * If classOutDir = null, files are written into same directory as the sources - * they were generated from. - */ - private File classOutDir = uninited; - - /** The output directory, used when generating sources while processing annotations. - * Initialized by the "-s" option. - */ - private File sourceOutDir = uninited; - - protected boolean mmappedIO; - protected boolean ignoreSymbolFile; - - /** - * User provided charset (through javax.tools). - */ - protected Charset charset; - - /** - * Register a Context.Factory to create a JavacFileManager. - */ - public static void preRegister(final Context context) { - context.put(JavaFileManager.class, new Context.Factory<JavaFileManager>() { - public JavaFileManager make() { - return new JavacFileManager(context, true, null); - } - }); - } - - /** - * Create a JavacFileManager using a given context, optionally registering - * it as the JavaFileManager for that context. - */ - public JavacFileManager(Context context, boolean register, Charset charset) { - if (register) - context.put(JavaFileManager.class, this); - byteBufferCache = new ByteBufferCache(); - this.charset = charset; - setContext(context); - } - - /** - * Set the context for JavacFileManager. - */ - public void setContext(Context context) { - log = Log.instance(context); - if (paths == null) { - paths = Paths.instance(context); - } else { - // Reuse the Paths object as it stores the locations that - // have been set with setLocation, etc. - paths.setContext(context); - } - - options = Options.instance(context); - - useZipFileIndex = System.getProperty("useJavaUtilZip") == null;// TODO: options.get("useJavaUtilZip") == null; - CHECK_ZIP_TIMESTAMP = System.getProperty("checkZipIndexTimestamp") != null;// TODO: options.get("checkZipIndexTimestamp") != null; - - mmappedIO = options.get("mmappedIO") != null; - ignoreSymbolFile = options.get("ignore.symbol.file") != null; - } - - public JavaFileObject getFileForInput(String name) { - return getRegularFile(new File(name)); - } - - public JavaFileObject getRegularFile(File file) { - return new RegularFileObject(file); - } - - public JavaFileObject getFileForOutput(String classname, - JavaFileObject.Kind kind, - JavaFileObject sibling) - throws IOException - { - return getJavaFileForOutput(CLASS_OUTPUT, classname, kind, sibling); - } - - public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) { - ListBuffer<File> files = new ListBuffer<File>(); - for (String name : names) - files.append(new File(nullCheck(name))); - return getJavaFileObjectsFromFiles(files.toList()); - } - - public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) { - return getJavaFileObjectsFromStrings(Arrays.asList(nullCheck(names))); - } - - protected JavaFileObject.Kind getKind(String extension) { - if (extension.equals(JavaFileObject.Kind.CLASS.extension)) - return JavaFileObject.Kind.CLASS; - else if (extension.equals(JavaFileObject.Kind.SOURCE.extension)) - return JavaFileObject.Kind.SOURCE; - else if (extension.equals(JavaFileObject.Kind.HTML.extension)) - return JavaFileObject.Kind.HTML; - else - return JavaFileObject.Kind.OTHER; - } - - private static boolean isValidName(String name) { - // Arguably, isValidName should reject keywords (such as in SourceVersion.isName() ), - // but the set of keywords depends on the source level, and we don't want - // impls of JavaFileManager to have to be dependent on the source level. - // Therefore we simply check that the argument is a sequence of identifiers - // separated by ".". - for (String s : name.split("\\.", -1)) { - if (!SourceVersion.isIdentifier(s)) - return false; - } - return true; - } - - private static void validateClassName(String className) { - if (!isValidName(className)) - throw new IllegalArgumentException("Invalid class name: " + className); - } - - private static void validatePackageName(String packageName) { - if (packageName.length() > 0 && !isValidName(packageName)) - throw new IllegalArgumentException("Invalid packageName name: " + packageName); - } - - public static void testName(String name, - boolean isValidPackageName, - boolean isValidClassName) - { - try { - validatePackageName(name); - if (!isValidPackageName) - throw new AssertionError("Invalid package name accepted: " + name); - printAscii("Valid package name: \"%s\"", name); - } catch (IllegalArgumentException e) { - if (isValidPackageName) - throw new AssertionError("Valid package name rejected: " + name); - printAscii("Invalid package name: \"%s\"", name); - } - try { - validateClassName(name); - if (!isValidClassName) - throw new AssertionError("Invalid class name accepted: " + name); - printAscii("Valid class name: \"%s\"", name); - } catch (IllegalArgumentException e) { - if (isValidClassName) - throw new AssertionError("Valid class name rejected: " + name); - printAscii("Invalid class name: \"%s\"", name); - } - } - private static void printAscii(String format, Object... args) { - String message; - try { - final String ascii = "US-ASCII"; - message = new String(String.format(null, format, args).getBytes(ascii), ascii); - } catch (java.io.UnsupportedEncodingException ex) { - throw new AssertionError(ex); - } - System.out.println(message); - } - - /** Return external representation of name, - * converting '.' to File.separatorChar. - */ - private static String externalizeFileName(CharSequence name) { - return name.toString().replace('.', File.separatorChar); - } - - private static String externalizeFileName(CharSequence n, JavaFileObject.Kind kind) { - return externalizeFileName(n) + kind.extension; - } - - private static String baseName(String fileName) { - return fileName.substring(fileName.lastIndexOf(File.separatorChar) + 1); - } - - /** - * Insert all files in subdirectory `subdirectory' of `directory' which end - * in one of the extensions in `extensions' into packageSym. - */ - private void listDirectory(File directory, - String subdirectory, - Set<JavaFileObject.Kind> fileKinds, - boolean recurse, - ListBuffer<JavaFileObject> l) { - Archive archive = archives.get(directory); - - boolean isFile = false; - if (CHECK_ZIP_TIMESTAMP) { - Boolean isf = isDirectory.get(directory); - if (isf == null) { - isFile = directory.isFile(); - isDirectory.put(directory, isFile); - } - else { - isFile = directory.isFile(); - } - } - else { - isFile = directory.isFile(); - } - - if (archive != null || isFile) { - if (archive == null) { - try { - archive = openArchive(directory); - } catch (IOException ex) { - log.error("error.reading.file", - directory, ex.getLocalizedMessage()); - return; - } - } - if (subdirectory.length() != 0) { - if (!useZipFileIndex) { - subdirectory = subdirectory.replace('\\', '/'); - if (!subdirectory.endsWith("/")) subdirectory = subdirectory + "/"; - } - else { - if (File.separatorChar == '/') { - subdirectory = subdirectory.replace('\\', '/'); - } - else { - subdirectory = subdirectory.replace('/', '\\'); - } - - if (!subdirectory.endsWith(File.separator)) subdirectory = subdirectory + File.separator; - } - } - - List<String> files = archive.getFiles(subdirectory); - if (files != null) { - for (String file; !files.isEmpty(); files = files.tail) { - file = files.head; - if (isValidFile(file, fileKinds)) { - l.append(archive.getFileObject(subdirectory, file)); - } - } - } - if (recurse) { - for (String s: archive.getSubdirectories()) { - if (s.startsWith(subdirectory) && !s.equals(subdirectory)) { - // Because the archive map is a flat list of directories, - // the enclosing loop will pick up all child subdirectories. - // Therefore, there is no need to recurse deeper. - listDirectory(directory, s, fileKinds, false, l); - } - } - } - } else { - File d = subdirectory.length() != 0 - ? new File(directory, subdirectory) - : directory; - if (!caseMapCheck(d, subdirectory)) - return; - - File[] files = d.listFiles(); - if (files == null) - return; - - for (File f: files) { - String fname = f.getName(); - if (f.isDirectory()) { - if (recurse && SourceVersion.isIdentifier(fname)) { - listDirectory(directory, - subdirectory + File.separator + fname, - fileKinds, - recurse, - l); - } - } else { - if (isValidFile(fname, fileKinds)) { - JavaFileObject fe = - new RegularFileObject(fname, new File(d, fname)); - l.append(fe); - } - } - } - } - } - - private boolean isValidFile(String s, Set<JavaFileObject.Kind> fileKinds) { - int lastDot = s.lastIndexOf("."); - String extn = (lastDot == -1 ? s : s.substring(lastDot)); - JavaFileObject.Kind kind = getKind(extn); - return fileKinds.contains(kind); - } - - private static final boolean fileSystemIsCaseSensitive = - File.separatorChar == '/'; - - /** Hack to make Windows case sensitive. Test whether given path - * ends in a string of characters with the same case as given name. - * Ignore file separators in both path and name. - */ - private boolean caseMapCheck(File f, String name) { - if (fileSystemIsCaseSensitive) return true; - // Note that getCanonicalPath() returns the case-sensitive - // spelled file name. - String path; - try { - path = f.getCanonicalPath(); - } catch (IOException ex) { - return false; - } - char[] pcs = path.toCharArray(); - char[] ncs = name.toCharArray(); - int i = pcs.length - 1; - int j = ncs.length - 1; - while (i >= 0 && j >= 0) { - while (i >= 0 && pcs[i] == File.separatorChar) i--; - while (j >= 0 && ncs[j] == File.separatorChar) j--; - if (i >= 0 && j >= 0) { - if (pcs[i] != ncs[j]) return false; - i--; - j--; - } - } - return j < 0; - } - - /** - * An archive provides a flat directory structure of a ZipFile by - * mapping directory names to lists of files (basenames). - */ - public interface Archive { - void close() throws IOException; - - boolean contains(String name); - - JavaFileObject getFileObject(String subdirectory, String file); - - List<String> getFiles(String subdirectory); - - Set<String> getSubdirectories(); - } - - public class ZipArchive implements Archive { - protected final Map<String,List<String>> map; - protected final ZipFile zdir; - public ZipArchive(ZipFile zdir) throws IOException { - this.zdir = zdir; - this.map = new HashMap<String,List<String>>(); - for (Enumeration<? extends ZipEntry> e = zdir.entries(); e.hasMoreElements(); ) { - ZipEntry entry; - try { - entry = e.nextElement(); - } catch (InternalError ex) { - IOException io = new IOException(); - io.initCause(ex); // convenience constructors added in Mustang :-( - throw io; - } - addZipEntry(entry); - } - } - - void addZipEntry(ZipEntry entry) { - String name = entry.getName(); - int i = name.lastIndexOf('/'); - String dirname = name.substring(0, i+1); - String basename = name.substring(i+1); - if (basename.length() == 0) - return; - List<String> list = map.get(dirname); - if (list == null) - list = List.nil(); - list = list.prepend(basename); - map.put(dirname, list); - } - - public boolean contains(String name) { - int i = name.lastIndexOf('/'); - String dirname = name.substring(0, i+1); - String basename = name.substring(i+1); - if (basename.length() == 0) - return false; - List<String> list = map.get(dirname); - return (list != null && list.contains(basename)); - } - - public List<String> getFiles(String subdirectory) { - return map.get(subdirectory); - } - - public JavaFileObject getFileObject(String subdirectory, String file) { - ZipEntry ze = zdir.getEntry(subdirectory + file); - return new ZipFileObject(file, zdir, ze); - } - - public Set<String> getSubdirectories() { - return map.keySet(); - } - - public void close() throws IOException { - zdir.close(); - } - } - - public class SymbolArchive extends ZipArchive { - final File origFile; - public SymbolArchive(File orig, ZipFile zdir) throws IOException { - super(zdir); - this.origFile = orig; - } - - @Override - void addZipEntry(ZipEntry entry) { - // called from super constructor, may not refer to origFile. - String name = entry.getName(); - if (!name.startsWith(symbolFilePrefix)) - return; - name = name.substring(symbolFilePrefix.length()); - int i = name.lastIndexOf('/'); - String dirname = name.substring(0, i+1); - String basename = name.substring(i+1); - if (basename.length() == 0) - return; - List<String> list = map.get(dirname); - if (list == null) - list = List.nil(); - list = list.prepend(basename); - map.put(dirname, list); - } - - @Override - public JavaFileObject getFileObject(String subdirectory, String file) { - return super.getFileObject(symbolFilePrefix + subdirectory, file); - } - } - - public class MissingArchive implements Archive { - final File zipFileName; - public MissingArchive(File name) { - zipFileName = name; - } - public boolean contains(String name) { - return false; - } - - public void close() { - } - - public JavaFileObject getFileObject(String subdirectory, String file) { - return null; - } - - public List<String> getFiles(String subdirectory) { - return List.nil(); - } - - public Set<String> getSubdirectories() { - return Collections.emptySet(); - } - } - - /** A directory of zip files already opened. - */ - Map<File, Archive> archives = new HashMap<File,Archive>(); - - /** Open a new zip file directory. - */ - protected Archive openArchive(File zipFileName) throws IOException { - Archive archive = archives.get(zipFileName); - if (archive == null) { - File origZipFileName = zipFileName; - if (!ignoreSymbolFile && paths.isBootClassPathRtJar(zipFileName)) { - File file = zipFileName.getParentFile().getParentFile(); // ${java.home} - if (new File(file.getName()).equals(new File("jre"))) - file = file.getParentFile(); - // file == ${jdk.home} - for (String name : symbolFileLocation) - file = new File(file, name); - // file == ${jdk.home}/lib/ct.sym - if (file.exists()) - zipFileName = file; - } - - try { - - ZipFile zdir = null; - - boolean usePreindexedCache = false; - String preindexCacheLocation = null; - - if (!useZipFileIndex) { - zdir = new ZipFile(zipFileName); - } - else { - usePreindexedCache = options.get("usezipindex") != null; - preindexCacheLocation = options.get("java.io.tmpdir"); - String optCacheLoc = options.get("cachezipindexdir"); - - if (optCacheLoc != null && optCacheLoc.length() != 0) { - if (optCacheLoc.startsWith("\"")) { - if (optCacheLoc.endsWith("\"")) { - optCacheLoc = optCacheLoc.substring(1, optCacheLoc.length() - 1); - } - else { - optCacheLoc = optCacheLoc.substring(1); - } - } - - File cacheDir = new File(optCacheLoc); - if (cacheDir.exists() && cacheDir.canWrite()) { - preindexCacheLocation = optCacheLoc; - if (!preindexCacheLocation.endsWith("/") && - !preindexCacheLocation.endsWith(File.separator)) { - preindexCacheLocation += File.separator; - } - } - } - } - - if (origZipFileName == zipFileName) { - if (!useZipFileIndex) { - archive = new ZipArchive(zdir); - } else { - archive = new ZipFileIndexArchive(this, ZipFileIndex.getZipFileIndex(zipFileName, 0, - usePreindexedCache, preindexCacheLocation, options.get("writezipindexfiles") != null)); - } - } - else { - if (!useZipFileIndex) { - archive = new SymbolArchive(origZipFileName, zdir); - } - else { - archive = new ZipFileIndexArchive(this, ZipFileIndex.getZipFileIndex(zipFileName, symbolFilePrefixLength, - usePreindexedCache, preindexCacheLocation, options.get("writezipindexfiles") != null)); - } - } - } catch (FileNotFoundException ex) { - archive = new MissingArchive(zipFileName); - } catch (IOException ex) { - log.error("error.reading.file", zipFileName, ex.getLocalizedMessage()); - archive = new MissingArchive(zipFileName); - } - - archives.put(origZipFileName, archive); - } - return archive; - } - - /** Flush any output resources. - */ - public void flush() { - contentCache.clear(); - } - - /** - * Close the JavaFileManager, releasing resources. - */ - public void close() { - for (Iterator<Archive> i = archives.values().iterator(); i.hasNext(); ) { - Archive a = i.next(); - i.remove(); - try { - a.close(); - } catch (IOException e) { - } - } - } - - private Map<JavaFileObject, SoftReference<CharBuffer>> contentCache = new HashMap<JavaFileObject, SoftReference<CharBuffer>>(); - - private String defaultEncodingName; - private String getDefaultEncodingName() { - if (defaultEncodingName == null) { - defaultEncodingName = - new OutputStreamWriter(new ByteArrayOutputStream()).getEncoding(); - } - return defaultEncodingName; - } - - protected String getEncodingName() { - String encName = options.get(OptionName.ENCODING); - if (encName == null) - return getDefaultEncodingName(); - else - return encName; - } - - protected Source getSource() { - String sourceName = options.get(OptionName.SOURCE); - Source source = null; - if (sourceName != null) - source = Source.lookup(sourceName); - return (source != null ? source : Source.DEFAULT); - } - - /** - * Make a byte buffer from an input stream. - */ - private ByteBuffer makeByteBuffer(InputStream in) - throws IOException { - int limit = in.available(); - if (mmappedIO && in instanceof FileInputStream) { - // Experimental memory mapped I/O - FileInputStream fin = (FileInputStream)in; - return fin.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, limit); - } - if (limit < 1024) limit = 1024; - ByteBuffer result = byteBufferCache.get(limit); - int position = 0; - while (in.available() != 0) { - if (position >= limit) - // expand buffer - result = ByteBuffer. - allocate(limit <<= 1). - put((ByteBuffer)result.flip()); - int count = in.read(result.array(), - position, - limit - position); - if (count < 0) break; - result.position(position += count); - } - return (ByteBuffer)result.flip(); - } - - /** - * A single-element cache of direct byte buffers. - */ - private static class ByteBufferCache { - private ByteBuffer cached; - ByteBuffer get(int capacity) { - if (capacity < 20480) capacity = 20480; - ByteBuffer result = - (cached != null && cached.capacity() >= capacity) - ? (ByteBuffer)cached.clear() - : ByteBuffer.allocate(capacity + capacity>>1); - cached = null; - return result; - } - void put(ByteBuffer x) { - cached = x; - } - } - private final ByteBufferCache byteBufferCache; - - private CharsetDecoder getDecoder(String encodingName, boolean ignoreEncodingErrors) { - Charset charset = (this.charset == null) - ? Charset.forName(encodingName) - : this.charset; - CharsetDecoder decoder = charset.newDecoder(); - - CodingErrorAction action; - if (ignoreEncodingErrors) - action = CodingErrorAction.REPLACE; - else - action = CodingErrorAction.REPORT; - - return decoder - .onMalformedInput(action) - .onUnmappableCharacter(action); - } - - /** - * Decode a ByteBuffer into a CharBuffer. - */ - private CharBuffer decode(ByteBuffer inbuf, boolean ignoreEncodingErrors) { - String encodingName = getEncodingName(); - CharsetDecoder decoder; - try { - decoder = getDecoder(encodingName, ignoreEncodingErrors); - } catch (IllegalCharsetNameException e) { - log.error("unsupported.encoding", encodingName); - return (CharBuffer)CharBuffer.allocate(1).flip(); - } catch (UnsupportedCharsetException e) { - log.error("unsupported.encoding", encodingName); - return (CharBuffer)CharBuffer.allocate(1).flip(); - } - - // slightly overestimate the buffer size to avoid reallocation. - float factor = - decoder.averageCharsPerByte() * 0.8f + - decoder.maxCharsPerByte() * 0.2f; - CharBuffer dest = CharBuffer. - allocate(10 + (int)(inbuf.remaining()*factor)); - - while (true) { - CoderResult result = decoder.decode(inbuf, dest, true); - dest.flip(); - - if (result.isUnderflow()) { // done reading - // make sure there is at least one extra character - if (dest.limit() == dest.capacity()) { - dest = CharBuffer.allocate(dest.capacity()+1).put(dest); - dest.flip(); - } - return dest; - } else if (result.isOverflow()) { // buffer too small; expand - int newCapacity = - 10 + dest.capacity() + - (int)(inbuf.remaining()*decoder.maxCharsPerByte()); - dest = CharBuffer.allocate(newCapacity).put(dest); - } else if (result.isMalformed() || result.isUnmappable()) { - // bad character in input - - // report coding error (warn only pre 1.5) - if (!getSource().allowEncodingErrors()) { - log.error(new SimpleDiagnosticPosition(dest.limit()), - "illegal.char.for.encoding", - charset == null ? encodingName : charset.name()); - } else { - log.warning(new SimpleDiagnosticPosition(dest.limit()), - "illegal.char.for.encoding", - charset == null ? encodingName : charset.name()); - } - - // skip past the coding error - inbuf.position(inbuf.position() + result.length()); - - // undo the flip() to prepare the output buffer - // for more translation - dest.position(dest.limit()); - dest.limit(dest.capacity()); - dest.put((char)0xfffd); // backward compatible - } else { - throw new AssertionError(result); - } - } - // unreached - } - - public ClassLoader getClassLoader(Location location) { - nullCheck(location); - Iterable<? extends File> path = getLocation(location); - if (path == null) - return null; - ListBuffer<URL> lb = new ListBuffer<URL>(); - for (File f: path) { - try { - lb.append(f.toURI().toURL()); - } catch (MalformedURLException e) { - throw new AssertionError(e); - } - } - return new URLClassLoader(lb.toArray(new URL[lb.size()]), - getClass().getClassLoader()); - } - - public Iterable<JavaFileObject> list(Location location, - String packageName, - Set<JavaFileObject.Kind> kinds, - boolean recurse) - throws IOException - { - // validatePackageName(packageName); - nullCheck(packageName); - nullCheck(kinds); - - Iterable<? extends File> path = getLocation(location); - if (path == null) - return List.nil(); - String subdirectory = externalizeFileName(packageName); - ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>(); - - for (File directory : path) - listDirectory(directory, subdirectory, kinds, recurse, results); - - return results.toList(); - } - - public String inferBinaryName(Location location, JavaFileObject file) { - file.getClass(); // null check - location.getClass(); // null check - // Need to match the path semantics of list(location, ...) - Iterable<? extends File> path = getLocation(location); - if (path == null) { - //System.err.println("Path for " + location + " is null"); - return null; - } - //System.err.println("Path for " + location + " is " + path); - - if (file instanceof RegularFileObject) { - RegularFileObject r = (RegularFileObject) file; - String rPath = r.getPath(); - //System.err.println("RegularFileObject " + file + " " +r.getPath()); - for (File dir: path) { - //System.err.println("dir: " + dir); - String dPath = dir.getPath(); - if (dPath.length() == 0) - dPath = System.getProperty("user.dir"); - if (!dPath.endsWith(File.separator)) - dPath += File.separator; - if (rPath.regionMatches(true, 0, dPath, 0, dPath.length()) - && new File(rPath.substring(0, dPath.length())).equals(new File(dPath))) { - String relativeName = rPath.substring(dPath.length()); - return removeExtension(relativeName).replace(File.separatorChar, '.'); - } - } - } else if (file instanceof ZipFileObject) { - ZipFileObject z = (ZipFileObject) file; - String entryName = z.getZipEntryName(); - if (entryName.startsWith(symbolFilePrefix)) - entryName = entryName.substring(symbolFilePrefix.length()); - return removeExtension(entryName).replace('/', '.'); - } else if (file instanceof ZipFileIndexFileObject) { - ZipFileIndexFileObject z = (ZipFileIndexFileObject) file; - String entryName = z.getZipEntryName(); - if (entryName.startsWith(symbolFilePrefix)) - entryName = entryName.substring(symbolFilePrefix.length()); - return removeExtension(entryName).replace(File.separatorChar, '.'); - } else - throw new IllegalArgumentException(file.getClass().getName()); - // System.err.println("inferBinaryName failed for " + file); - return null; - } - // where - private static String removeExtension(String fileName) { - int lastDot = fileName.lastIndexOf("."); - return (lastDot == -1 ? fileName : fileName.substring(0, lastDot)); - } - - public boolean isSameFile(FileObject a, FileObject b) { - nullCheck(a); - nullCheck(b); - if (!(a instanceof BaseFileObject)) - throw new IllegalArgumentException("Not supported: " + a); - if (!(b instanceof BaseFileObject)) - throw new IllegalArgumentException("Not supported: " + b); - return a.equals(b); - } - - public boolean handleOption(String current, Iterator<String> remaining) { - for (JavacOption o: javacFileManagerOptions) { - if (o.matches(current)) { - if (o.hasArg()) { - if (remaining.hasNext()) { - if (!o.process(options, current, remaining.next())) - return true; - } - } else { - if (!o.process(options, current)) - return true; - } - // operand missing, or process returned false - throw new IllegalArgumentException(current); - } - } - - return false; - } - // where - private static JavacOption[] javacFileManagerOptions = - RecognizedOptions.getJavacFileManagerOptions( - new RecognizedOptions.GrumpyHelper()); - - public int isSupportedOption(String option) { - for (JavacOption o : javacFileManagerOptions) { - if (o.matches(option)) - return o.hasArg() ? 1 : 0; - } - return -1; - } - - public boolean hasLocation(Location location) { - return getLocation(location) != null; - } - - public JavaFileObject getJavaFileForInput(Location location, - String className, - JavaFileObject.Kind kind) - throws IOException - { - nullCheck(location); - // validateClassName(className); - nullCheck(className); - nullCheck(kind); - if (!sourceOrClass.contains(kind)) - throw new IllegalArgumentException("Invalid kind " + kind); - return getFileForInput(location, externalizeFileName(className, kind)); - } - - public FileObject getFileForInput(Location location, - String packageName, - String relativeName) - throws IOException - { - nullCheck(location); - // validatePackageName(packageName); - nullCheck(packageName); - if (!isRelativeUri(URI.create(relativeName))) // FIXME 6419701 - throw new IllegalArgumentException("Invalid relative name: " + relativeName); - String name = packageName.length() == 0 - ? relativeName - : new File(externalizeFileName(packageName), relativeName).getPath(); - return getFileForInput(location, name); - } - - private JavaFileObject getFileForInput(Location location, String name) throws IOException { - Iterable<? extends File> path = getLocation(location); - if (path == null) - return null; - - for (File dir: path) { - if (dir.isDirectory()) { - File f = new File(dir, name.replace('/', File.separatorChar)); - if (f.exists()) - return new RegularFileObject(f); - } else { - Archive a = openArchive(dir); - if (a.contains(name)) { - int i = name.lastIndexOf('/'); - String dirname = name.substring(0, i+1); - String basename = name.substring(i+1); - return a.getFileObject(dirname, basename); - } - - } - } - return null; - - } - - public JavaFileObject getJavaFileForOutput(Location location, - String className, - JavaFileObject.Kind kind, - FileObject sibling) - throws IOException - { - nullCheck(location); - // validateClassName(className); - nullCheck(className); - nullCheck(kind); - if (!sourceOrClass.contains(kind)) - throw new IllegalArgumentException("Invalid kind " + kind); - return getFileForOutput(location, externalizeFileName(className, kind), sibling); - } - - public FileObject getFileForOutput(Location location, - String packageName, - String relativeName, - FileObject sibling) - throws IOException - { - nullCheck(location); - // validatePackageName(packageName); - nullCheck(packageName); - if (!isRelativeUri(URI.create(relativeName))) // FIXME 6419701 - throw new IllegalArgumentException("relativeName is invalid"); - String name = packageName.length() == 0 - ? relativeName - : new File(externalizeFileName(packageName), relativeName).getPath(); - return getFileForOutput(location, name, sibling); - } - - private JavaFileObject getFileForOutput(Location location, - String fileName, - FileObject sibling) - throws IOException - { - File dir; - if (location == CLASS_OUTPUT) { - if (getClassOutDir() != null) { - dir = getClassOutDir(); - } else { - File siblingDir = null; - if (sibling != null && sibling instanceof RegularFileObject) { - siblingDir = ((RegularFileObject)sibling).f.getParentFile(); - } - return new RegularFileObject(new File(siblingDir, baseName(fileName))); - } - } else if (location == SOURCE_OUTPUT) { - dir = (getSourceOutDir() != null ? getSourceOutDir() : getClassOutDir()); - } else { - Iterable<? extends File> path = paths.getPathForLocation(location); - dir = null; - for (File f: path) { - dir = f; - break; - } - } - - File file = (dir == null ? new File(fileName) : new File(dir, fileName)); - return new RegularFileObject(file); - - } - - public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles( - Iterable<? extends File> files) - { - ArrayList<RegularFileObject> result; - if (files instanceof Collection) - result = new ArrayList<RegularFileObject>(((Collection)files).size()); - else - result = new ArrayList<RegularFileObject>(); - for (File f: files) - result.add(new RegularFileObject(nullCheck(f))); - return result; - } - - public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) { - return getJavaFileObjectsFromFiles(Arrays.asList(nullCheck(files))); - } - - public void setLocation(Location location, - Iterable<? extends File> path) - throws IOException - { - nullCheck(location); - paths.lazy(); - - final File dir = location.isOutputLocation() ? getOutputDirectory(path) : null; - - if (location == CLASS_OUTPUT) - classOutDir = getOutputLocation(dir, D); - else if (location == SOURCE_OUTPUT) - sourceOutDir = getOutputLocation(dir, S); - else - paths.setPathForLocation(location, path); - } - // where - private File getOutputDirectory(Iterable<? extends File> path) throws IOException { - if (path == null) - return null; - Iterator<? extends File> pathIter = path.iterator(); - if (!pathIter.hasNext()) - throw new IllegalArgumentException("empty path for directory"); - File dir = pathIter.next(); - if (pathIter.hasNext()) - throw new IllegalArgumentException("path too long for directory"); - if (!dir.exists()) - throw new FileNotFoundException(dir + ": does not exist"); - else if (!dir.isDirectory()) - throw new IOException(dir + ": not a directory"); - return dir; - } - - private File getOutputLocation(File dir, OptionName defaultOptionName) { - if (dir != null) - return dir; - String arg = options.get(defaultOptionName); - if (arg == null) - return null; - return new File(arg); - } - - public Iterable<? extends File> getLocation(Location location) { - nullCheck(location); - paths.lazy(); - if (location == CLASS_OUTPUT) { - return (getClassOutDir() == null ? null : List.of(getClassOutDir())); - } else if (location == SOURCE_OUTPUT) { - return (getSourceOutDir() == null ? null : List.of(getSourceOutDir())); - } else - return paths.getPathForLocation(location); - } - - private File getClassOutDir() { - if (classOutDir == uninited) - classOutDir = getOutputLocation(null, D); - return classOutDir; - } - - private File getSourceOutDir() { - if (sourceOutDir == uninited) - sourceOutDir = getOutputLocation(null, S); - return sourceOutDir; - } - - /** - * Enforces the specification of a "relative" URI as used in - * {@linkplain #getFileForInput(Location,String,URI) - * getFileForInput}. This method must follow the rules defined in - * that method, do not make any changes without consulting the - * specification. - */ - protected static boolean isRelativeUri(URI uri) { - if (uri.isAbsolute()) - return false; - String path = uri.normalize().getPath(); - if (path.length() == 0 /* isEmpty() is mustang API */) - return false; - char first = path.charAt(0); - return first != '.' && first != '/'; - } - - /** - * Converts a relative file name to a relative URI. This is - * different from File.toURI as this method does not canonicalize - * the file before creating the URI. Furthermore, no schema is - * used. - * @param file a relative file name - * @return a relative URI - * @throws IllegalArgumentException if the file name is not - * relative according to the definition given in {@link - * javax.tools.JavaFileManager#getFileForInput} - */ - public static String getRelativeName(File file) { - if (!file.isAbsolute()) { - String result = file.getPath().replace(File.separatorChar, '/'); - if (JavacFileManager.isRelativeUri(URI.create(result))) // FIXME 6419701 - return result; - } - throw new IllegalArgumentException("Invalid relative path: " + file); - } - - @SuppressWarnings("deprecation") // bug 6410637 - protected static String getJavacFileName(FileObject file) { - if (file instanceof BaseFileObject) - return ((BaseFileObject)file).getPath(); - URI uri = file.toUri(); - String scheme = uri.getScheme(); - if (scheme == null || scheme.equals("file") || scheme.equals("jar")) - return uri.getPath(); - else - return uri.toString(); - } - - @SuppressWarnings("deprecation") // bug 6410637 - protected static String getJavacBaseFileName(FileObject file) { - if (file instanceof BaseFileObject) - return ((BaseFileObject)file).getName(); - URI uri = file.toUri(); - String scheme = uri.getScheme(); - if (scheme == null || scheme.equals("file") || scheme.equals("jar")) { - String path = uri.getPath(); - if (path == null) - return null; - if (scheme != null && scheme.equals("jar")) - path = path.substring(path.lastIndexOf('!') + 1); - return path.substring(path.lastIndexOf('/') + 1); - } else { - return uri.toString(); - } - } - - private static <T> T nullCheck(T o) { - o.getClass(); // null check - return o; - } - - private static <T> Iterable<T> nullCheck(Iterable<T> it) { - for (T t : it) - t.getClass(); // null check - return it; - } - - /** - * A subclass of JavaFileObject representing regular files. - */ - private class RegularFileObject extends BaseFileObject { - /** Have the parent directories been created? - */ - private boolean hasParents=false; - - /** The file's name. - */ - private String name; - - /** The underlying file. - */ - final File f; - - public RegularFileObject(File f) { - this(f.getName(), f); - } - - public RegularFileObject(String name, File f) { - if (f.isDirectory()) - throw new IllegalArgumentException("directories not supported"); - this.name = name; - this.f = f; - } - - public InputStream openInputStream() throws IOException { - return new FileInputStream(f); - } - - protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) { - return JavacFileManager.this.getDecoder(getEncodingName(), ignoreEncodingErrors); - } - - public OutputStream openOutputStream() throws IOException { - ensureParentDirectoriesExist(); - return new FileOutputStream(f); - } - - public Writer openWriter() throws IOException { - ensureParentDirectoriesExist(); - return new OutputStreamWriter(new FileOutputStream(f), getEncodingName()); - } - - private void ensureParentDirectoriesExist() throws IOException { - if (!hasParents) { - File parent = f.getParentFile(); - if (parent != null && !parent.exists()) { - if (!parent.mkdirs()) { - // if the mkdirs failed, it may be because another process concurrently - // created the directory, so check if the directory got created - // anyway before throwing an exception - if (!parent.exists() || !parent.isDirectory()) - throw new IOException("could not create parent directories"); - } - } - hasParents = true; - } - } - - /** @deprecated see bug 6410637 */ - @Deprecated - public String getName() { - return name; - } - - public boolean isNameCompatible(String cn, JavaFileObject.Kind kind) { - cn.getClass(); // null check - if (kind == Kind.OTHER && getKind() != kind) - return false; - String n = cn + kind.extension; - if (name.equals(n)) - return true; - if (name.equalsIgnoreCase(n)) { - try { - // allow for Windows - return (f.getCanonicalFile().getName().equals(n)); - } catch (IOException e) { - } - } - return false; - } - - /** @deprecated see bug 6410637 */ - @Deprecated - public String getPath() { - return f.getPath(); - } - - public long getLastModified() { - return f.lastModified(); - } - - public boolean delete() { - return f.delete(); - } - - public CharBuffer getCharContent(boolean ignoreEncodingErrors) throws IOException { - SoftReference<CharBuffer> r = contentCache.get(this); - CharBuffer cb = (r == null ? null : r.get()); - if (cb == null) { - InputStream in = new FileInputStream(f); - try { - ByteBuffer bb = makeByteBuffer(in); - JavaFileObject prev = log.useSource(this); - try { - cb = decode(bb, ignoreEncodingErrors); - } finally { - log.useSource(prev); - } - byteBufferCache.put(bb); // save for next time - if (!ignoreEncodingErrors) - contentCache.put(this, new SoftReference<CharBuffer>(cb)); - } finally { - in.close(); - } - } - return cb; - } - - @Override - public boolean equals(Object other) { - if (!(other instanceof RegularFileObject)) - return false; - RegularFileObject o = (RegularFileObject) other; - try { - return f.equals(o.f) - || f.getCanonicalFile().equals(o.f.getCanonicalFile()); - } catch (IOException e) { - return false; - } - } - - @Override - public int hashCode() { - return f.hashCode(); - } - - public URI toUri() { - try { - // Do no use File.toURI to avoid file system access - String path = f.getAbsolutePath().replace(File.separatorChar, '/'); - return new URI("file://" + path).normalize(); - } catch (URISyntaxException ex) { - return f.toURI(); - } - } - - } - - /** - * A subclass of JavaFileObject representing zip entries. - */ - public class ZipFileObject extends BaseFileObject { - - /** The entry's name. - */ - private String name; - - /** The zipfile containing the entry. - */ - ZipFile zdir; - - /** The underlying zip entry object. - */ - ZipEntry entry; - - public ZipFileObject(String name, ZipFile zdir, ZipEntry entry) { - this.name = name; - this.zdir = zdir; - this.entry = entry; - } - - public InputStream openInputStream() throws IOException { - return zdir.getInputStream(entry); - } - - public OutputStream openOutputStream() throws IOException { - throw new UnsupportedOperationException(); - } - - protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) { - return JavacFileManager.this.getDecoder(getEncodingName(), ignoreEncodingErrors); - } - - public Writer openWriter() throws IOException { - throw new UnsupportedOperationException(); - } - - /** @deprecated see bug 6410637 */ - @Deprecated - public String getName() { - return name; - } - - public boolean isNameCompatible(String cn, JavaFileObject.Kind k) { - cn.getClass(); // null check - if (k == Kind.OTHER && getKind() != k) - return false; - return name.equals(cn + k.extension); - } - - /** ... [truncated message content] |
From: <ls...@us...> - 2011-03-05 11:38:25
|
Revision: 5800 http://jnode.svn.sourceforge.net/jnode/?rev=5800&view=rev Author: lsantha Date: 2011-03-05 11:38:17 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java classlib6/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java classlib6/core/src/openjdk/org/org/omg/CORBA/TCKind.java classlib6/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java classlib6/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java classlib6/core/src/openjdk/org/org/xml/sax/AttributeList.java classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java classlib6/core/src/openjdk/org/org/xml/sax/Locator.java classlib6/core/src/openjdk/org/org/xml/sax/Parser.java classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java classlib6/core/src/openjdk/org/org/xml/sax/package.html Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* * $Id: DOMDigestMethod.java,v 1.17 2005/05/10 18:15:32 mullan Exp $ Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 2009, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* * $Id: DOMHMACSignatureMethod.java,v 1.17 2005/09/15 14:29:04 mullan Exp $ @@ -59,6 +59,7 @@ Logger.getLogger("org.jcp.xml.dsig.internal.dom"); private Mac hmac; private int outputLength; + private boolean outputLengthSet; /** * Creates a <code>DOMHMACSignatureMethod</code> with the specified params @@ -88,13 +89,12 @@ ("params must be of type HMACParameterSpec"); } outputLength = ((HMACParameterSpec) params).getOutputLength(); + outputLengthSet = true; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Setting outputLength from HMACParameterSpec to: " + outputLength); } - } else { - outputLength = -1; } } @@ -102,6 +102,7 @@ throws MarshalException { outputLength = new Integer (paramsElem.getFirstChild().getNodeValue()).intValue(); + outputLengthSet = true; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "unmarshalled outputLength: " + outputLength); } @@ -136,23 +137,13 @@ throw new XMLSignatureException(nsae); } } - if (log.isLoggable(Level.FINE)) { - log.log(Level.FINE, "outputLength = " + outputLength); + if (outputLengthSet && outputLength < getDigestLength()) { + throw new XMLSignatureException + ("HMACOutputLength must not be less than " + getDigestLength()); } hmac.init((SecretKey) key); si.canonicalize(context, new MacOutputStream(hmac)); byte[] result = hmac.doFinal(); - if (log.isLoggable(Level.FINE)) { - log.log(Level.FINE, "resultLength = " + result.length); - } - if (outputLength != -1) { - int byteLength = outputLength/8; - if (result.length > byteLength) { - byte[] truncated = new byte[byteLength]; - System.arraycopy(result, 0, truncated, 0, byteLength); - result = truncated; - } - } return MessageDigest.isEqual(sig, result); } @@ -172,18 +163,13 @@ throw new XMLSignatureException(nsae); } } + if (outputLengthSet && outputLength < getDigestLength()) { + throw new XMLSignatureException + ("HMACOutputLength must not be less than " + getDigestLength()); + } hmac.init((SecretKey) key); si.canonicalize(context, new MacOutputStream(hmac)); - byte[] result = hmac.doFinal(); - if (outputLength != -1) { - int byteLength = outputLength/8; - if (result.length > byteLength) { - byte[] truncated = new byte[byteLength]; - System.arraycopy(result, 0, truncated, 0, byteLength); - result = truncated; - } - } - return result; + return hmac.doFinal(); } boolean paramsEqual(AlgorithmParameterSpec spec) { @@ -198,6 +184,11 @@ return (outputLength == ospec.getOutputLength()); } + /** + * Returns the output length of the hash/digest. + */ + abstract int getDigestLength(); + static final class SHA1 extends DOMHMACSignatureMethod { SHA1(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { @@ -212,6 +203,9 @@ String getSignatureAlgorithm() { return "HmacSHA1"; } + int getDigestLength() { + return 160; + } } static final class SHA256 extends DOMHMACSignatureMethod { @@ -228,6 +222,9 @@ String getSignatureAlgorithm() { return "HmacSHA256"; } + int getDigestLength() { + return 256; + } } static final class SHA384 extends DOMHMACSignatureMethod { @@ -244,6 +241,9 @@ String getSignatureAlgorithm() { return "HmacSHA384"; } + int getDigestLength() { + return 384; + } } static final class SHA512 extends DOMHMACSignatureMethod { @@ -260,5 +260,8 @@ String getSignatureAlgorithm() { return "HmacSHA512"; } + int getDigestLength() { + return 512; + } } } Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* * Copyright 1999-2004 The Apache Software Foundation. Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* * $Id: DOMXMLSignatureFactory.java,v 1.21 2005/09/23 19:59:11 mullan Exp $ Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2010, 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 Modified: classlib6/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2010, 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 Modified: classlib6/core/src/openjdk/org/org/omg/CORBA/TCKind.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/TCKind.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/TCKind.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, 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 Modified: classlib6/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, 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 Modified: classlib6/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2010, 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 Modified: classlib6/core/src/openjdk/org/org/xml/sax/AttributeList.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/AttributeList.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/AttributeList.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX Attribute List Interface. Modified: classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // Attributes.java - attribute list with Namespace support Modified: classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // ContentHandler.java - handle main document content. Modified: classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX DTD handler. Modified: classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX document handler. Modified: classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX entity resolver. Modified: classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX error handler. Modified: classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX default handler base class. Modified: classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX input source. Modified: classlib6/core/src/openjdk/org/org/xml/sax/Locator.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/Locator.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/Locator.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX locator interface for document events. Modified: classlib6/core/src/openjdk/org/org/xml/sax/Parser.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/Parser.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/Parser.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX parser interface. Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX exception class. @@ -56,6 +56,7 @@ * * @since SAX 1.0 * @author David Megginson + * @version 2.0.1 (sax2r2) * @see org.xml.sax.SAXParseException */ public class SAXException extends Exception { @@ -145,6 +146,14 @@ return exception; } + /** + * Return the cause of the exception + * + * @return Return the cause of the exception + */ + public Throwable getCause() { + return exception; + } /** * Override toString to pick up any embedded exception. @@ -154,7 +163,7 @@ public String toString () { if (exception != null) { - return exception.toString(); + return super.toString() + "\n" + exception.toString(); } else { return super.toString(); } Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAXNotRecognizedException.java - unrecognized feature or value. Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAXNotSupportedException.java - unsupported feature or value. Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // SAX exception class. @@ -54,6 +54,7 @@ * * @since SAX 1.0 * @author David Megginson + * @version 2.0.1 (sax2r2) * @see org.xml.sax.SAXException * @see org.xml.sax.Locator * @see org.xml.sax.ErrorHandler @@ -255,6 +256,23 @@ return this.columnNumber; } + /** + * Override toString to provide more detailed error message. + * + * @return A string representation of this exception. + */ + public String toString() { + StringBuilder buf = new StringBuilder(getClass().getName()); + String message = getLocalizedMessage(); + if (publicId!=null) buf.append("publicId: ").append(publicId); + if (systemId!=null) buf.append("; systemId: ").append(systemId); + if (lineNumber!=-1) buf.append("; lineNumber: ").append(lineNumber); + if (columnNumber!=-1) buf.append("; columnNumber: ").append(columnNumber); + + //append the exception message at the end + if (message!=null) buf.append("; ").append(message); + return buf.toString(); + } ////////////////////////////////////////////////////////////////////// // Internal state. Modified: classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // XMLFilter.java - filter SAX2 events. Modified: classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ // XMLReader.java - read an XML document. Modified: classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -34,6 +34,8 @@ import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; +import java.security.AccessController; +import java.security.PrivilegedAction; import org.xml.sax.XMLReader; import org.xml.sax.SAXException; @@ -69,6 +71,7 @@ * * @since SAX 2.0 * @author David Megginson, David Brownell + * @version 2.0.1 (sax2r2) */ final public class XMLReaderFactory { @@ -83,6 +86,8 @@ private static final String property = "org.xml.sax.driver"; + private static String _clsFromJar = null; + private static boolean _jarread = false; /** * Attempt to create an XMLReader from system defaults. * In environments which can support it, the name of the XMLReader @@ -137,24 +142,35 @@ // 2. if that fails, try META-INF/services/ if (className == null) { + if (!_jarread) { + final ClassLoader loader1 = loader; + _jarread = true; + _clsFromJar = (String) + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + String clsName = null; try { String service = "META-INF/services/" + property; InputStream in; BufferedReader reader; - - if (loader == null) + if (loader1 == null) in = ClassLoader.getSystemResourceAsStream (service); else - in = loader.getResourceAsStream (service); + in = loader1.getResourceAsStream (service); if (in != null) { reader = new BufferedReader ( new InputStreamReader (in, "UTF8")); - className = reader.readLine (); + clsName = reader.readLine (); in.close (); } } catch (Excep... [truncated message content] |
From: <ls...@us...> - 2011-03-05 11:36:51
|
Revision: 5799 http://jnode.svn.sourceforge.net/jnode/?rev=5799&view=rev Author: lsantha Date: 2011-03-05 11:36:39 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/ws/resources/model.properties classlib6/core/src/openjdk/jaxws/javax/xml/bind/ContextFinder.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/DatatypeConverter.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/DatatypeConverterImpl.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/DatatypeConverterInterface.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/Element.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/JAXBContext.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/JAXBException.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/MarshalException.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/Marshaller.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/NotIdentifiableEvent.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/ParseConversionEvent.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/PrintConversionEvent.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/PropertyException.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/TypeConstraintException.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/UnmarshalException.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/Unmarshaller.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/UnmarshallerHandler.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/ValidationEvent.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/ValidationEventHandler.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/ValidationEventLocator.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/ValidationException.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/Validator.java classlib6/core/src/openjdk/jaxws/javax/xml/bind/package.html classlib6/core/src/openjdk/jaxws/javax/xml/ws/spi/FactoryFinder.java classlib6/core/src/openjdk/jaxws/javax/xml/ws/spi/package.html classlib6/core/src/openjdk/jaxws/javax/xml/ws/wsaddressing/W3CEndpointReference.java classlib6/core/src/openjdk/jaxws/javax/xml/ws/wsaddressing/package.html Added Paths: ----------- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java Removed Paths: ------------- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.java classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.properties classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocator.java classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/ws/addressing/model/InvalidMapException.java classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/ws/addressing/model/MapRequiredException.java classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/ws/client/ResponseImpl.java classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/ws/encoding/AbstractXMLStreamWriterExImpl.java classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/ws/handler/package-info.java classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/ws/streaming/XMLReader.java Modified: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/ws/resources/model.properties =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/ws/resources/model.properties 2011-03-05 11:28:28 UTC (rev 5798) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/ws/resources/model.properties 2011-03-05 11:36:39 UTC (rev 5799) @@ -1,12 +1,12 @@ # -# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. +# Copyright (c) 2005, 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. Sun designates this +# published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided -# by Sun in the LICENSE file that accompanied this code. +# 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 @@ -18,9 +18,9 @@ # 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -# CA 95054 USA or visit www.sun.com if you need additional information or -# have any questions. +# 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. # @@ -58,7 +58,6 @@ model.uniqueness=uniqueness constraint violation model.part.notUnique=parts in wsdl:message \"{0}\", reference \"{1}\", they must reference unique global elements. -model.parameter.notunique=Failed to generate Java signature: duplicate parameter names {0}. Use JAXWS binding customization to rename the wsdl:part \"{1}\" model.exception.notunique=Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part \"{1}\" model.uniqueness.javastructuretype=uniqueness constraint violation, duplicate member \"{0}\" added to JavaStructureType \"{1}\" model.parent.type.already.set=parent of type \"{0}\" already set to \"{1}\", new value = \"{2}\" @@ -78,8 +77,10 @@ model.arraywrapper.no.subtypes=LiteralArrayWrapper cannot have subtypes model.arraywrapper.no.content.member=LiteralArrayWrapper cannot have a content member model.complexType.simpleContent.reservedName=invalid attribute name: "_value" in complexType: \"{0}\", _value is JAXWS reserved name, this name is generated in the generated javabean class to hold content value in the generated javabean class for complexType/simpleContent. +model.parameter.notunique.wrapper=Failed to generate Java signature: duplicate parameter name \"{0}\". Try one of these\n\t1. Use JAXWS binding customization to rename the wsdl:part \"{1}\"\n\t2. Run wsimport with -extension switch.\n\t3. This is wrapper style operation, to resolve parameter name conflict, you can also try disabling wrapper style by using <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl customization. +model.parameter.notunique=Failed to generate Java signature: duplicate parameter name \"{0}\". Try one of these\n\t1. Use JAXWS binding customization to rename the wsdl:part \"{1}\"\n\t2. Run wsimport with -extension switch. -//JAXWS 2.0 +#JAXWS 2.0 model.schema.elementNotFound=Element \"{0}\" not found. model.schema.jaxbException.message="{0}" model.saxparser.exception:{0}\n{1} @@ -89,4 +90,3 @@ ConsoleErrorReporter.LineXOfY = \ \ \ line {0} of {1} - Deleted: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.java 2011-03-05 11:28:28 UTC (rev 5798) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.api.impl.j2s; - -import java.text.MessageFormat; -import java.util.ResourceBundle; - -/** - * @author Kohsuke Kawaguchi - */ -enum Messages { - ; - - - private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName()); - - public String toString() { - return format(); - } - - public String format( Object... args ) { - return MessageFormat.format( rb.getString(name()), args ); - } -} Deleted: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.properties =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.properties 2011-03-05 11:28:28 UTC (rev 5798) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/api/impl/j2s/Messages.properties 2011-03-05 11:36:39 UTC (rev 5799) @@ -1,26 +0,0 @@ -# -# Copyright 2005-2006 Sun Microsystems, Inc. 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. Sun designates this -# particular file as subject to the "Classpath" exception as provided -# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -# CA 95054 USA or visit www.sun.com if you need additional information or -# have any questions. -# - - Added: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java (rev 0) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.generator.bean.field; + +import java.util.ArrayList; +import java.util.List; + +import com.sun.codemodel.internal.JBlock; +import com.sun.codemodel.internal.JClass; +import com.sun.codemodel.internal.JExpr; +import com.sun.codemodel.internal.JExpression; +import com.sun.codemodel.internal.JMethod; +import com.sun.codemodel.internal.JType; +import com.sun.codemodel.internal.JVar; +import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl; +import com.sun.tools.internal.xjc.generator.bean.MethodWriter; +import com.sun.tools.internal.xjc.model.CPropertyInfo; +import com.sun.tools.internal.xjc.outline.Aspect; +import com.sun.xml.internal.bind.api.impl.NameConverter; +import java.io.Serializable; + +/** + * Realizes a property as an untyped {@link List}. + * + * <pre> + * List getXXX(); + * </pre> + * + * <h2>Default value handling</h2> + * <p> + * Since unmarshaller just adds new values into the storage, + * we can't fill the storage by default values at the time of + * instanciation. (or oherwise values found in the document will + * be appended to default values, where it should overwrite them.) + * <p> + * Therefore, when the object is created, the storage will be empty. + * When the getXXX method is called, we'll check if the storage is + * modified in anyway. If it is modified, it must mean that the values + * are found in the document, so we just return it. + * + * Otherwise we will fill in default values and return it to the user. + * + * <p> + * When a list has default values, its dirty flag is set to true. + * Marshaller will check this and treat it appropriately. + * + * + * @author + * Kohsuke Kawaguchi (koh...@su...) + */ +public class ContentListField extends AbstractListField { + + /** + * A concrete class that implements the List interface. + * An instance of this class will be used to store data + * for this field. + */ + private final JClass coreList; + + /** List getFIELD() method. */ + private JMethod $get; + + /** + * @param coreList + * A concrete class that implements the List interface. + * An instance of this class will be used to store data + * for this field. + */ + protected ContentListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { + // the JAXB runtime picks ArrayList if the signature is List, + // so don't do eager allocation if it's ArrayList. + // otherwise we need to do eager allocation so that the collection type specified by the user + // will be used. + super(context, prop, false); + this.coreList = coreList; + generate(); + } + + protected final JClass getCoreListType() { + return coreList; + } + + @Override + public void generateAccessors() { + final MethodWriter writer = outline.createMethodWriter(); + final Accessor acc = create(JExpr._this()); + + // [RESULT] + // List getXXX() { + // return <ref>; + // } + $get = writer.declareMethod(listT,"get"+prop.getName(true)); + writer.javadoc().append(prop.javadoc); + JBlock block = $get.body(); + fixNullRef(block); // avoid using an internal getter + block._return(acc.ref(true)); + + String pname = NameConverter.standard.toVariableName(prop.getName(true)); + writer.javadoc().append( + "Gets the value of the "+pname+" property.\n\n"+ + "<p>\n" + + "This accessor method returns a reference to the live list,\n" + + "not a snapshot. Therefore any modification you make to the\n" + + "returned list will be present inside the JAXB object.\n" + + "This is why there is not a <CODE>set</CODE> method for the " +pname+ " property.\n" + + "\n"+ + "<p>\n" + + "For example, to add a new item, do as follows:\n"+ + "<pre>\n"+ + " get"+prop.getName(true)+"().add(newItem);\n"+ + "</pre>\n"+ + "\n\n" + ); + + writer.javadoc().append( + "<p>\n" + + "Objects of the following type(s) are allowed in the list\n") + .append(listPossibleTypes(prop)); + } + + public Accessor create(JExpression targetObject) { + return new Accessor(targetObject); + } + + class Accessor extends AbstractListField.Accessor { + protected Accessor( JExpression $target ) { + super($target); + } + + public void toRawValue(JBlock block, JVar $var) { + // [RESULT] + // $<var>.addAll(bean.getLIST()); + // list.toArray( array ); + block.assign($var,JExpr._new(codeModel.ref(ArrayList.class).narrow(exposedType.boxify())).arg( + $target.invoke($get) + )); + } + + public void fromRawValue(JBlock block, String uniqueName, JExpression $var) { + // [RESULT] + // bean.getLIST().addAll($<var>); + JVar $list = block.decl(listT,uniqueName+'l',$target.invoke($get)); + block.invoke($list,"addAll").arg($var); + } + } + + @Override + protected JType getType(final Aspect aspect) { + if (Aspect.IMPLEMENTATION.equals(aspect)) { + return super.getType(aspect); + } + return codeModel.ref(Serializable.class); + } +} Added: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java (rev 0) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.generator.bean.field; + +import com.sun.codemodel.internal.JAnnotatable; +import java.util.ArrayList; +import java.util.List; + +import com.sun.codemodel.internal.JBlock; +import com.sun.codemodel.internal.JClass; +import com.sun.codemodel.internal.JExpr; +import com.sun.codemodel.internal.JExpression; +import com.sun.codemodel.internal.JMethod; +import com.sun.codemodel.internal.JVar; +import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl; +import com.sun.tools.internal.xjc.model.CPropertyInfo; +import com.sun.tools.internal.xjc.model.CReferencePropertyInfo; +import com.sun.xml.internal.bind.annotation.OverrideAnnotationOf; + +/** + * Realizes a property as an untyped {@link List}. + * + * <pre> + * List getXXX(); + * </pre> + * + * <h2>Default value handling</h2> + * <p> + * Since unmarshaller just adds new values into the storage, + * we can't fill the storage by default values at the time of + * instanciation. (or oherwise values found in the document will + * be appended to default values, where it should overwrite them.) + * <p> + * Therefore, when the object is created, the storage will be empty. + * When the getXXX method is called, we'll check if the storage is + * modified in anyway. If it is modified, it must mean that the values + * are found in the document, so we just return it. + * + * Otherwise we will fill in default values and return it to the user. + * + * <p> + * When a list has default values, its dirty flag is set to true. + * Marshaller will check this and treat it appropriately. + * + * + * @author + * Kohsuke Kawaguchi (koh...@su...) + */ +public class DummyListField extends AbstractListField { + + /** + * A concrete class that imp lements the List interface. + * An instance of this class will be used to store data + * for this field. + */ + private final JClass coreList; + + + /** List getFIELD() method. */ + private JMethod $get; + + /** + * @param coreList + * A concrete class that implements the List interface. + * An instance of this class will be used to store data + * for this field. + */ + protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { + // the JAXB runtime picks ArrayList if the signature is List, + // so don't do eager allocation if it's ArrayList. + // otherwise we need to do eager allocation so that the collection type specified by the user + // will be used. + super(context, prop, !coreList.fullName().equals("java.util.ArrayList")); + this.coreList = coreList.narrow(exposedType.boxify()); + generate(); + } + + /** + * Annotate the field according to the recipes given as {@link CPropertyInfo}. + */ + @Override + protected void annotate( JAnnotatable field ) { + super.annotate(field); + + if (prop instanceof CReferencePropertyInfo) { + CReferencePropertyInfo pref = (CReferencePropertyInfo)prop; + if (pref.isDummy()) { + annotateDummy(field); + } + } + + } + + private void annotateDummy(JAnnotatable field) { + field.annotate(OverrideAnnotationOf.class); + } + + protected final JClass getCoreListType() { + return coreList; + } + + @Override + public void generateAccessors() { } + + public Accessor create(JExpression targetObject) { + return new Accessor(targetObject); + } + + class Accessor extends AbstractListField.Accessor { + protected Accessor( JExpression $target ) { + super($target); + } + + public void toRawValue(JBlock block, JVar $var) { + // [RESULT] + // $<var>.addAll(bean.getLIST()); + // list.toArray( array ); + block.assign($var,JExpr._new(codeModel.ref(ArrayList.class).narrow(exposedType.boxify())).arg( + $target.invoke($get) + )); + } + + public void fromRawValue(JBlock block, String uniqueName, JExpression $var) { + // [RESULT] + // bean.getLIST().addAll($<var>); + JVar $list = block.decl(listT,uniqueName+'l',$target.invoke($get)); + block.invoke($list,"addAll").arg($var); + } + } +} Added: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java (rev 0) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.generator.bean.field; + +import java.util.ArrayList; +import java.util.List; + +import com.sun.codemodel.internal.JBlock; +import com.sun.codemodel.internal.JClass; +import com.sun.codemodel.internal.JExpr; +import com.sun.codemodel.internal.JExpression; +import com.sun.codemodel.internal.JMethod; +import com.sun.codemodel.internal.JType; +import com.sun.codemodel.internal.JVar; +import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl; +import com.sun.tools.internal.xjc.generator.bean.MethodWriter; +import com.sun.tools.internal.xjc.model.CElement; +import com.sun.tools.internal.xjc.model.CPropertyInfo; +import com.sun.tools.internal.xjc.model.CReferencePropertyInfo; +import com.sun.tools.internal.xjc.outline.Aspect; +import com.sun.xml.internal.bind.api.impl.NameConverter; +import java.io.Serializable; +import java.util.Set; + +/** + * Realizes a property as an untyped {@link List}. + * + * <pre> + * List getXXX(); + * </pre> + * + * <h2>Default value handling</h2> + * <p> + * Since unmarshaller just adds new values into the storage, + * we can't fill the storage by default values at the time of + * instanciation. (or oherwise values found in the document will + * be appended to default values, where it should overwrite them.) + * <p> + * Therefore, when the object is created, the storage will be empty. + * When the getXXX method is called, we'll check if the storage is + * modified in anyway. If it is modified, it must mean that the values + * are found in the document, so we just return it. + * + * Otherwise we will fill in default values and return it to the user. + * + * <p> + * When a list has default values, its dirty flag is set to true. + * Marshaller will check this and treat it appropriately. + * + * + * @author + * Kohsuke Kawaguchi (koh...@su...) + */ +public class NoExtendedContentField extends AbstractListField { + + /** + * A concrete class that implements the List interface. + * An instance of this class will be used to store data + * for this field. + */ + private final JClass coreList; + + /** List getFIELD() method. */ + private JMethod $get; + + /** + * @param coreList + * A concrete class that implements the List interface. + * An instance of this class will be used to store data + * for this field. + */ + protected NoExtendedContentField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { + // the JAXB runtime picks ArrayList if the signature is List, + // so don't do eager allocation if it's ArrayList. + // otherwise we need to do eager allocation so that the collection type specified by the user + // will be used. + super(context, prop, false); + this.coreList = coreList; + generate(); + } + + protected final JClass getCoreListType() { + return coreList; + } + + @Override + public void generateAccessors() { + final MethodWriter writer = outline.createMethodWriter(); + final Accessor acc = create(JExpr._this()); + + // [RESULT] + // List getXXX() { + // return <ref>; + // } + $get = writer.declareMethod(listT,"get"+prop.getName(true)); + writer.javadoc().append(prop.javadoc); + JBlock block = $get.body(); + fixNullRef(block); // avoid using an internal getter + block._return(acc.ref(true)); + + String pname = NameConverter.standard.toVariableName(prop.getName(true)); + writer.javadoc().append( + "Gets the value of the "+pname+" property.\n\n"+ + "<p>\n" + + "This accessor method returns a reference to the live list,\n" + + "not a snapshot. Therefore any modification you make to the\n" + + "returned list will be present inside the JAXB object.\n" + + "This is why there is not a <CODE>set</CODE> method for the " +pname+ " property.\n" + + "\n"+ + "<p>\n" + + "For example, to add a new item, do as follows:\n"+ + "<pre>\n"+ + " get"+prop.getName(true)+"().add(newItem);\n"+ + "</pre>\n"+ + "\n\n" + ); + + writer.javadoc().append( + "<p>\n" + + "Objects of the following type(s) are allowed in the list\n") + .append(listPossibleTypes(prop)); + } + + public Accessor create(JExpression targetObject) { + return new Accessor(targetObject); + } + + class Accessor extends AbstractListField.Accessor { + protected Accessor( JExpression $target ) { + super($target); + } + + public void toRawValue(JBlock block, JVar $var) { + // [RESULT] + // $<var>.addAll(bean.getLIST()); + // list.toArray( array ); + block.assign($var,JExpr._new(codeModel.ref(ArrayList.class).narrow(getType(Aspect.EXPOSED).boxify())).arg( + $target.invoke($get) + )); + } + + public void fromRawValue(JBlock block, String uniqueName, JExpression $var) { + // [RESULT] + // bean.getLIST().addAll($<var>); + JVar $list = block.decl(listT,uniqueName+'l',$target.invoke($get)); + block.invoke($list,"addAll").arg($var); + } + } + + @Override + protected JType getType(final Aspect aspect) { + if (Aspect.IMPLEMENTATION.equals(aspect)) { + return super.getType(aspect); + } + + if (prop instanceof CReferencePropertyInfo) { + Set<CElement> elements = ((CReferencePropertyInfo)prop).getElements(); + if ((elements != null) && (elements.size() > 0)) { + return codeModel.ref(Serializable.class); + } + } + + return codeModel.ref(String.class); + } +} Added: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java (rev 0) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.reader.xmlschema.bindinfo; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.namespace.QName; + +import com.sun.xml.internal.xsom.XSComponent; +import com.sun.tools.internal.xjc.model.CPropertyInfo; +import com.sun.tools.internal.xjc.reader.Ring; +import com.sun.tools.internal.xjc.reader.Const; +import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder; + +/** + * Controls the <tt>ObjectFactory</tt> method name. + * + * @author Kohsuke Kawaguchi + */ +@XmlRootElement(name="factoryMethod") +public class BIFactoryMethod extends AbstractDeclarationImpl { + @XmlAttribute + public String name; + + /** + * If the given component has {@link BIInlineBinaryData} customization, + * reflect that to the specified property. + */ + public static void handle(XSComponent source, CPropertyInfo prop) { + BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class); + if(inline!=null) { + prop.inlineBinaryData = true; + inline.markAsAcknowledged(); + } + } + + + public final QName getName() { return NAME; } + + /** Name of the declaration. */ + public static final QName NAME = new QName(Const.JAXB_NSURI,"factoryMethod"); +} Added: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java (rev 0) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.reader.xmlschema.bindinfo; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlInlineBinaryData; +import javax.xml.namespace.QName; + +import com.sun.tools.internal.xjc.reader.Const; +import com.sun.tools.internal.xjc.reader.Ring; +import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder; +import com.sun.tools.internal.xjc.model.CPropertyInfo; +import com.sun.xml.internal.xsom.XSComponent; + +/** + * Generates {@link @XmlInlineBinaryData}. + * + * @author Kohsuke Kawaguchi + */ +@XmlRootElement(name="inlineBinaryData") +public class BIInlineBinaryData extends AbstractDeclarationImpl { + + /** + * If the given component has {@link BIInlineBinaryData} customization, + * reflect that to the specified property. + */ + public static void handle(XSComponent source, CPropertyInfo prop) { + BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class); + if(inline!=null) { + prop.inlineBinaryData = true; + inline.markAsAcknowledged(); + } + } + + + public final QName getName() { return NAME; } + + /** Name of the declaration. */ + public static final QName NAME = new QName(Const.JAXB_NSURI,"inlineBinaryData"); +} Added: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java (rev 0) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.reader.xmlschema.ct; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import com.sun.tools.internal.xjc.reader.xmlschema.WildcardNameClassBuilder; +import com.sun.xml.internal.xsom.XSAttributeUse; +import com.sun.xml.internal.xsom.XSComplexType; +import com.sun.xml.internal.xsom.XSContentType; +import com.sun.xml.internal.xsom.XSDeclaration; +import com.sun.xml.internal.xsom.XSElementDecl; +import com.sun.xml.internal.xsom.XSModelGroup; +import com.sun.xml.internal.xsom.XSModelGroupDecl; +import com.sun.xml.internal.xsom.XSParticle; +import com.sun.xml.internal.xsom.XSType; +import com.sun.xml.internal.xsom.XSWildcard; +import com.sun.xml.internal.xsom.visitor.XSTermFunction; + +import com.sun.xml.internal.rngom.nc.ChoiceNameClass; +import com.sun.xml.internal.rngom.nc.NameClass; +import com.sun.xml.internal.rngom.nc.SimpleNameClass; + +/** + * Binds a complex type derived from another complex type by extension. + * + * @author + * Kohsuke Kawaguchi (koh...@su...) + */ +abstract class AbstractExtendedComplexTypeBuilder extends CTBuilder { + + /** + * Map from {@link XSComplexType} to {@link NameClass}[2] that + * represents the names used in its child elements [0] and + * attributes [1]. + */ + protected final Map<XSComplexType, NameClass[]> characteristicNameClasses = new HashMap<XSComplexType, NameClass[]>(); + + /** + * Computes a name class that represents everything in a given content model. + */ + protected final XSTermFunction<NameClass> contentModelNameClassBuilder = new XSTermFunction<NameClass>() { + public NameClass wildcard(XSWildcard wc) { + return WildcardNameClassBuilder.build(wc); + } + + public NameClass modelGroupDecl(XSModelGroupDecl decl) { + return modelGroup(decl.getModelGroup()); + } + + public NameClass modelGroup(XSModelGroup group) { + NameClass nc = NameClass.NULL; + for( int i=0; i<group.getSize(); i++ ) + nc = new ChoiceNameClass(nc, group.getChild(i).getTerm().apply(this)); + return nc; + } + + public NameClass elementDecl(XSElementDecl decl) { + return getNameClass(decl); + } + }; + + /** + * Checks if the particles/attributes defined in the type parameter + * collides with the name classes of anc/enc. + * + * @return true if there's a collision. + */ + protected boolean checkCollision(NameClass anc, NameClass enc, XSComplexType type) { + NameClass[] chnc = characteristicNameClasses.get(type); + if (chnc == null) { + chnc = new NameClass[2]; + chnc[0] = getNameClass(type.getContentType()); + + // build attribute name classes + NameClass nc = NameClass.NULL; + Iterator itr = type.iterateAttributeUses(); + while( itr.hasNext() ) + anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); + XSWildcard wc = type.getAttributeWildcard(); + if(wc!=null) + nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc)); + chnc[1] = nc; + + characteristicNameClasses.put(type, chnc); + } + + return chnc[0].hasOverlapWith(enc) || chnc[1].hasOverlapWith(anc); + } + + /** + * Looks for the derivation chain t_1 > t_2 > ... > t + * and find t_i such that t_i derives by restriction but + * for every j>i, t_j derives by extension. + * + * @return null + * If there's no such t_i or if t_i is any type. + */ + protected XSComplexType getLastRestrictedType(XSComplexType t) { + if (t.getBaseType() == schemas.getAnyType()) { + return null; // we don't count the restriction from anyType + } + if (t.getDerivationMethod() == XSType.RESTRICTION) { + return t; + } + + XSComplexType baseType = t.getBaseType().asComplexType(); + if (baseType != null) { + return getLastRestrictedType(baseType); + } else { + return null; + } + } + + /** + * Checks if this new extension is safe. + * + * UGLY. + * <p> + * If you have ctA extending ctB and ctB restricting ctC, our + * Java classes will look like CtAImpl extending CtBImpl + * extending CtCImpl. + * + * <p> + * Since a derived class unmarshaller uses the base class unmarshaller, + * this could potentially result in incorrect unmarshalling. + * We used to just reject such a case, but then we found that + * there are schemas that are using it. + * + * <p> + * One generalized observation that we reached is that if the extension + * is only adding new elements/attributes which has never been used + * in any of its base class (IOW, if none of the particle / attribute use / + * attribute wildcard can match the name of newly added elements/attributes) + * then it is safe to add them. + * + * <p> + * This function checks if the derivation chain to this type is + * not using restriction, and if it is, then checks if it is safe + * according to the above condition. + * + * @return false + * If this complex type needs to be rejected. + */ + protected boolean checkIfExtensionSafe(XSComplexType baseType, XSComplexType thisType) { + XSComplexType lastType = getLastRestrictedType(baseType); + + if (lastType == null) { + return true; // no restriction in derivation chain + } + NameClass anc = NameClass.NULL; + // build name class for attributes in new complex type + Iterator itr = thisType.iterateDeclaredAttributeUses(); + while (itr.hasNext()) { + anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); + } + // TODO: attribute wildcard + + NameClass enc = getNameClass(thisType.getExplicitContent()); + + // check against every base type ... except the root anyType + while (lastType != lastType.getBaseType()) { + if (checkCollision(anc, enc, lastType)) { + return false; + } + + if (lastType.getBaseType().isSimpleType()) // if the base type is a simple type, there won't be + // any further name collision. + { + return true; + } + + lastType = lastType.getBaseType().asComplexType(); + } + + return true; // OK + } + + /** + * Gets a {@link NameClass} that represents all the terms in the given content type. + * If t is not a particle, just return an empty name class. + */ + private NameClass getNameClass(XSContentType t) { + if(t==null) return NameClass.NULL; + XSParticle p = t.asParticle(); + if(p==null) return NameClass.NULL; + else return p.getTerm().apply(contentModelNameClassBuilder); + } + + /** + * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}. + */ + private NameClass getNameClass(XSDeclaration decl) { + return new SimpleNameClass(decl.getTargetNamespace(), decl.getName()); + } + +} Added: classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java (rev 0) +++ classlib6/core/src/openjdk/jaxws/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2005, 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 com.sun.tools.internal.xjc.reader.xmlschema.ct; + +import com.sun.tools.internal.xjc.model.CClass; +import com.sun.tools.internal.xjc.model.CPropertyInfo; +import com.sun.tools.internal.xjc.reader.RawTypeSet; +import com.sun.tools.internal.xjc.reader.xmlschema.RawTypeSetBuilder; +import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding; +import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty; +import com.sun.xml.internal.xsom.XSComplexType; +import com.sun.xml.internal.xsom.XSContentType; +import com.sun.xml.internal.xsom.XSType; + +/** + * @author Kohsuke Kawaguchi + */ +final class MixedExtendedComplexTypeBuilder extends AbstractExtendedComplexTypeBuilder { + + public boolean isApplicable(XSComplexType ct) { + + if (!bgmBuilder.isGenerateMixedExtensions()) return false; + + XSType bt = ct.getBaseType(); + if (bt.isComplexType() && + bt.asComplexType().isMixed() && + ct.isMixed() && + ct.getDerivationMethod()==XSType.EXTENSION && + ct.getContentType().asParticle() != null && + ct.getExplicitContent().asEmpty() == null + ) { + return true; + } + + return false; + } + + public void build(XSComplexType ct) { + XSComplexType baseType = ct.getBaseType().asComplexType(); + + // build the base class + CClass baseClass = selector.bindToType(baseType, ct, true); + assert baseClass != null; // global complex type must map to a class + + if (!checkIfExtensionSafe(baseType, ct)) { + // error. We can't handle any further extension + errorReceiver.error(ct.getLocator(), + Messages.ERR_NO_FURTHER_EXTENSION.format( + baseType.getName(), ct.getName() ) + ); + return; + } + + selector.getCurrentBean().setBaseClass(baseClass); + builder.recordBindingMode(ct, ComplexTypeBindingMode.FALLBACK_EXTENSION); + + BIProperty prop = BIProperty.getCustomization(ct); + CPropertyInfo p; + + RawTypeSet ts = RawTypeSetBuilder.build(ct.getContentType().asParticle(), false); + p = prop.createDummyExtendedMixedReferenceProperty("contentOverrideFor" + ct.getName(), ct, ts); + + selector.getCurrentBean().addProperty(p); + + // adds attributes and we are through. + green.attContainer(ct); + } + +} Deleted: classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocator.java =================================================================== --- classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocator.java 2011-03-05 11:28:28 UTC (rev 5798) +++ classlib6/core/src/openjdk/jaxws/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocator.java 2011-03-05 11:36:39 UTC (rev 5799) @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2005, 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. - * - * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC. - */ - - - - -package com.sun.xml.internal.fastinfoset.stax.events; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.events.Namespace; -import javax.xml.stream.events.XMLEvent; -import javax.xml.stream.util.XMLEventAllocator; -import javax.xml.stream.util.XMLEventConsumer; - -import com.sun.xml.internal.fastinfoset.CommonResourceBundle; - -/** - * This class provides the same functionality as StAXEventAllocatorBase, but without - * using EventFactory and creating a new object for each call. - * - * It seems to be good idea using static components. Unfortunately, EventReader's peek - * and next methods require that multiple instances being created. - * - */ -public class StAXEventAllocator implements XMLEventAllocator { - StartElementEvent startElement = new StartElementEvent(); - EndElementEvent endElement = new EndElementEvent(); - CharactersEvent characters = new CharactersEvent(); - CharactersEvent cData = new CharactersEvent("",true); - CharactersEvent space = new CharactersEvent(); - CommentEvent comment = new CommentEvent(); - EntityReferenceEvent entity = new EntityReferenceEvent(); - ProcessingInstructionEvent pi = new ProcessingInstructionEvent(); - StartDocumentEvent startDoc = new StartDocumentEvent(); - EndDocumentEvent endDoc = new EndDocumentEvent(); - DTDEvent dtd = new DTDEvent(); - - /** Creates a new instance of StAXEventAllocator */ - public StAXEventAllocator() { - } - public XMLEventAllocator newInstance() { - return new StAXEventAllocator(); - } - - /** - * This method allocates an event given the current state of the XMLStreamReader. - * If this XMLEventAllocator does not have a one-to-one mapping between reader state - * and events this method will return null. - * @param streamReader The XMLStreamReader to allocate from - * @return the event corresponding to the current reader state - */ - public XMLEvent allocate(XMLStreamReader streamReader) throws XMLStreamException { - if(streamReader == null ) - throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.nullReader")); - return getXMLEvent(streamReader); - } - - /** - * This method allocates an event or set of events given the current state of - * the XMLStreamReader and adds the event or set of events to the consumer that - * was passed in. - * @param streamReader The XMLStreamReader to allocate from - * @param consumer The XMLEventConsumer to add to. - */ - public void allocate(XMLStreamReader streamReader, XMLEventConsumer consumer) throws XMLStreamException { - consumer.add(getXMLEvent(streamReader)); - - } - // ---------------------end of methods defined by XMLEventAllocator-----------------// - - - XMLEvent getXMLEvent(XMLStreamReader reader){ - EventBase event = null; - int eventType = reader.getEventType(); - - switch(eventType){ - - case XMLEvent.START_ELEMENT: - { - startElement.reset(); - startElement.setName(new QName(reader.getNamespaceURI(), - reader.getLocalName(), reader.getPrefix())); - - addAttributes(startElement,reader); - addNamespaces(startElement, reader); - //need to fix it along with the Reader - //setNamespaceContext(startElement,reader); - event = startElement; - break; - } - case XMLEvent.END_ELEMENT: - { - endElement.reset(); - endElement.setName(new QName(reader.getNamespaceURI(), - reader.getLocalName(),reader.getPrefix())); - addNamespaces(endElement,reader); - event = endElement ; - break; - } - case XMLEvent.PROCESSING_INSTRUCTION: - { - pi.setTarget(reader.getPITarget()); - pi.setData(reader.getPIData()); - event = pi; - break; - } - case XMLEvent.CHARACTERS: - { - characters.setData(reader.getText()); - event = characters; - /** - if (reader.isWhiteSpace()) { - space.setData(reader.getText()); - space.setSpace(true); - event = space; - } - else { - characters.setData(reader.getText()); - event = characters; - } - */ - break; - } - case XMLEvent.COMMENT: - { - comment.setText(reader.getText()); - event = comment; - break; - } - case XMLEvent.START_DOCUMENT: - { - startDoc.reset(); - String encoding = reader.getEncoding(); - String version = reader.getVersion(); - if (encoding != null) - startDoc.setEncoding(encoding); - if (version != null) - startDoc.setVersion(version); - startDoc.setStandalone(reader.isStandalone()); - if(reader.getCharacterEncodingScheme() != null){ - startDoc.setDeclaredEncoding(true); - }else{ - startDoc.setDeclaredEncoding(false); - } - event = startDoc ; - break; - } - case XMLEvent.END_DOCUMENT:{ - event = endDoc; - break; - } - case XMLEvent.ENTITY_REFERENCE:{ - entity.setName(reader.getLocalName()); - entity.setDeclaration(new EntityDeclarationImpl(reader.getLocalName(),reader.getText())); - event = entity; - break; - - } - case XMLEvent.ATTRIBUTE:{ - event = null ; - break; - } - case XMLEvent.DTD:{ - dtd.setDTD(reader.getText()); - event = dtd; - break; - } - case XMLEvent.CDATA:{ - cData.setData(reader.getText()); - event = cData; - break; - } - case XMLEvent.SPACE:{ - space.setData(reader.getText()); - space.setSpace(true); - event = space; - break; - } - } - event.setLocation(reader.getLocation()); - return event ; - } - - //use event.a... [truncated message content] |
From: <ls...@us...> - 2011-03-05 11:28:40
|
Revision: 5798 http://jnode.svn.sourceforge.net/jnode/?rev=5798&view=rev Author: lsantha Date: 2011-03-05 11:28:28 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/javax/javax/accessibility/AccessibleResourceBundle.java classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitor.java classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitorMBean.java classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitor.java classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitorMBean.java classlib6/core/src/openjdk/javax/javax/management/monitor/Monitor.java classlib6/core/src/openjdk/javax/javax/management/monitor/MonitorMBean.java classlib6/core/src/openjdk/javax/javax/management/monitor/MonitorNotification.java classlib6/core/src/openjdk/javax/javax/management/monitor/MonitorSettingException.java classlib6/core/src/openjdk/javax/javax/management/monitor/StringMonitor.java classlib6/core/src/openjdk/javax/javax/management/monitor/StringMonitorMBean.java classlib6/core/src/openjdk/javax/javax/management/monitor/package.html classlib6/core/src/openjdk/javax/javax/management/openmbean/ArrayType.java classlib6/core/src/openjdk/javax/javax/management/openmbean/CompositeData.java classlib6/core/src/openjdk/javax/javax/management/openmbean/CompositeDataSupport.java classlib6/core/src/openjdk/javax/javax/management/openmbean/CompositeType.java classlib6/core/src/openjdk/javax/javax/management/openmbean/InvalidKeyException.java classlib6/core/src/openjdk/javax/javax/management/openmbean/InvalidOpenTypeException.java classlib6/core/src/openjdk/javax/javax/management/openmbean/KeyAlreadyExistsException.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenDataException.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanAttributeInfo.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanConstructorInfo.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanInfo.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanInfoSupport.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanOperationInfo.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanOperationInfoSupport.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanParameterInfo.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanParameterInfoSupport.java classlib6/core/src/openjdk/javax/javax/management/openmbean/OpenType.java classlib6/core/src/openjdk/javax/javax/management/openmbean/SimpleType.java classlib6/core/src/openjdk/javax/javax/management/openmbean/TabularData.java classlib6/core/src/openjdk/javax/javax/management/openmbean/TabularDataSupport.java classlib6/core/src/openjdk/javax/javax/management/openmbean/TabularType.java classlib6/core/src/openjdk/javax/javax/management/openmbean/package.html classlib6/core/src/openjdk/javax/javax/management/remote/rmi/NoCallStackClassLoader.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnection.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnectionImpl.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnector.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnectorServer.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIIIOPServerImpl.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIJRMPServerImpl.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIServer.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/RMIServerImpl.java classlib6/core/src/openjdk/javax/javax/management/remote/rmi/package.html classlib6/core/src/openjdk/javax/javax/net/ServerSocketFactory.java classlib6/core/src/openjdk/javax/javax/net/SocketFactory.java classlib6/core/src/openjdk/javax/javax/net/package.html classlib6/core/src/openjdk/javax/javax/rmi/PortableRemoteObject.java classlib6/core/src/openjdk/javax/javax/security/auth/login/AccountException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/AccountExpiredException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/AccountLockedException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/AccountNotFoundException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/AppConfigurationEntry.java classlib6/core/src/openjdk/javax/javax/security/auth/login/Configuration.java classlib6/core/src/openjdk/javax/javax/security/auth/login/CredentialException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/CredentialExpiredException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/CredentialNotFoundException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/FailedLoginException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/LoginContext.java classlib6/core/src/openjdk/javax/javax/security/auth/login/LoginException.java classlib6/core/src/openjdk/javax/javax/security/auth/login/package.html classlib6/core/src/openjdk/javax/javax/swing/AbstractAction.java classlib6/core/src/openjdk/javax/javax/swing/AbstractButton.java classlib6/core/src/openjdk/javax/javax/swing/AbstractCellEditor.java classlib6/core/src/openjdk/javax/javax/swing/AbstractListModel.java classlib6/core/src/openjdk/javax/javax/swing/AbstractSpinnerModel.java classlib6/core/src/openjdk/javax/javax/swing/Action.java classlib6/core/src/openjdk/javax/javax/swing/ActionMap.java classlib6/core/src/openjdk/javax/javax/swing/ActionPropertyChangeListener.java classlib6/core/src/openjdk/javax/javax/swing/AncestorNotifier.java classlib6/core/src/openjdk/javax/javax/swing/ArrayTable.java classlib6/core/src/openjdk/javax/javax/swing/Autoscroller.java classlib6/core/src/openjdk/javax/javax/swing/BorderFactory.java classlib6/core/src/openjdk/javax/javax/swing/BoundedRangeModel.java classlib6/core/src/openjdk/javax/javax/swing/Box.java classlib6/core/src/openjdk/javax/javax/swing/BoxLayout.java classlib6/core/src/openjdk/javax/javax/swing/ButtonGroup.java classlib6/core/src/openjdk/javax/javax/swing/ButtonModel.java classlib6/core/src/openjdk/javax/javax/swing/CellEditor.java classlib6/core/src/openjdk/javax/javax/swing/CellRendererPane.java classlib6/core/src/openjdk/javax/javax/swing/ClientPropertyKey.java classlib6/core/src/openjdk/javax/javax/swing/ComboBoxEditor.java classlib6/core/src/openjdk/javax/javax/swing/ComboBoxModel.java classlib6/core/src/openjdk/javax/javax/swing/ComponentInputMap.java classlib6/core/src/openjdk/javax/javax/swing/DebugGraphics.java classlib6/core/src/openjdk/javax/javax/swing/DebugGraphicsFilter.java classlib6/core/src/openjdk/javax/javax/swing/DebugGraphicsInfo.java classlib6/core/src/openjdk/javax/javax/swing/DebugGraphicsObserver.java classlib6/core/src/openjdk/javax/javax/swing/DefaultBoundedRangeModel.java classlib6/core/src/openjdk/javax/javax/swing/DefaultButtonModel.java classlib6/core/src/openjdk/javax/javax/swing/DefaultCellEditor.java classlib6/core/src/openjdk/javax/javax/swing/DefaultComboBoxModel.java classlib6/core/src/openjdk/javax/javax/swing/DefaultDesktopManager.java classlib6/core/src/openjdk/javax/javax/swing/DefaultFocusManager.java classlib6/core/src/openjdk/javax/javax/swing/DefaultListCellRenderer.java classlib6/core/src/openjdk/javax/javax/swing/DefaultListModel.java classlib6/core/src/openjdk/javax/javax/swing/DefaultListSelectionModel.java classlib6/core/src/openjdk/javax/javax/swing/DefaultSingleSelectionModel.java classlib6/core/src/openjdk/javax/javax/swing/DelegatingDefaultFocusManager.java classlib6/core/src/openjdk/javax/javax/swing/DesktopManager.java classlib6/core/src/openjdk/javax/javax/swing/FocusManager.java classlib6/core/src/openjdk/javax/javax/swing/GraphicsWrapper.java classlib6/core/src/openjdk/javax/javax/swing/GrayFilter.java classlib6/core/src/openjdk/javax/javax/swing/GroupLayout.java classlib6/core/src/openjdk/javax/javax/swing/Icon.java classlib6/core/src/openjdk/javax/javax/swing/ImageIcon.java classlib6/core/src/openjdk/javax/javax/swing/InputMap.java classlib6/core/src/openjdk/javax/javax/swing/InputVerifier.java classlib6/core/src/openjdk/javax/javax/swing/InternalFrameFocusTraversalPolicy.java classlib6/core/src/openjdk/javax/javax/swing/JApplet.java classlib6/core/src/openjdk/javax/javax/swing/JButton.java classlib6/core/src/openjdk/javax/javax/swing/JCheckBox.java classlib6/core/src/openjdk/javax/javax/swing/JCheckBoxMenuItem.java classlib6/core/src/openjdk/javax/javax/swing/JColorChooser.java classlib6/core/src/openjdk/javax/javax/swing/JComboBox.java classlib6/core/src/openjdk/javax/javax/swing/JComponent.java classlib6/core/src/openjdk/javax/javax/swing/JDesktopPane.java classlib6/core/src/openjdk/javax/javax/swing/JDialog.java classlib6/core/src/openjdk/javax/javax/swing/JEditorPane.java classlib6/core/src/openjdk/javax/javax/swing/JFileChooser.java classlib6/core/src/openjdk/javax/javax/swing/JFormattedTextField.java classlib6/core/src/openjdk/javax/javax/swing/JFrame.java classlib6/core/src/openjdk/javax/javax/swing/JInternalFrame.java classlib6/core/src/openjdk/javax/javax/swing/JLabel.java classlib6/core/src/openjdk/javax/javax/swing/JLayeredPane.java classlib6/core/src/openjdk/javax/javax/swing/JList.java classlib6/core/src/openjdk/javax/javax/swing/JMenu.java classlib6/core/src/openjdk/javax/javax/swing/JMenuBar.java classlib6/core/src/openjdk/javax/javax/swing/JMenuItem.java classlib6/core/src/openjdk/javax/javax/swing/JOptionPane.java classlib6/core/src/openjdk/javax/javax/swing/JPanel.java classlib6/core/src/openjdk/javax/javax/swing/JPasswordField.java classlib6/core/src/openjdk/javax/javax/swing/JPopupMenu.java classlib6/core/src/openjdk/javax/javax/swing/JProgressBar.java classlib6/core/src/openjdk/javax/javax/swing/JRadioButton.java classlib6/core/src/openjdk/javax/javax/swing/JRadioButtonMenuItem.java classlib6/core/src/openjdk/javax/javax/swing/JRootPane.java classlib6/core/src/openjdk/javax/javax/swing/JScrollBar.java classlib6/core/src/openjdk/javax/javax/swing/JScrollPane.java classlib6/core/src/openjdk/javax/javax/swing/JSeparator.java classlib6/core/src/openjdk/javax/javax/swing/JSlider.java classlib6/core/src/openjdk/javax/javax/swing/JSpinner.java classlib6/core/src/openjdk/javax/javax/swing/JSplitPane.java classlib6/core/src/openjdk/javax/javax/swing/JTabbedPane.java classlib6/core/src/openjdk/javax/javax/swing/JTable.java classlib6/core/src/openjdk/javax/javax/swing/JTextArea.java classlib6/core/src/openjdk/javax/javax/swing/JTextField.java classlib6/core/src/openjdk/javax/javax/swing/JTextPane.java classlib6/core/src/openjdk/javax/javax/swing/JToggleButton.java classlib6/core/src/openjdk/javax/javax/swing/JToolBar.java classlib6/core/src/openjdk/javax/javax/swing/JToolTip.java classlib6/core/src/openjdk/javax/javax/swing/JTree.java classlib6/core/src/openjdk/javax/javax/swing/JViewport.java classlib6/core/src/openjdk/javax/javax/swing/JWindow.java classlib6/core/src/openjdk/javax/javax/swing/KeyStroke.java classlib6/core/src/openjdk/javax/javax/swing/KeyboardManager.java classlib6/core/src/openjdk/javax/javax/swing/LayoutComparator.java classlib6/core/src/openjdk/javax/javax/swing/LayoutFocusTraversalPolicy.java classlib6/core/src/openjdk/javax/javax/swing/LegacyGlueFocusTraversalPolicy.java classlib6/core/src/openjdk/javax/javax/swing/ListCellRenderer.java classlib6/core/src/openjdk/javax/javax/swing/ListModel.java classlib6/core/src/openjdk/javax/javax/swing/ListSelectionModel.java classlib6/core/src/openjdk/javax/javax/swing/LookAndFeel.java classlib6/core/src/openjdk/javax/javax/swing/MenuElement.java classlib6/core/src/openjdk/javax/javax/swing/MenuSelectionManager.java classlib6/core/src/openjdk/javax/javax/swing/MultiUIDefaults.java classlib6/core/src/openjdk/javax/javax/swing/MutableComboBoxModel.java classlib6/core/src/openjdk/javax/javax/swing/OverlayLayout.java classlib6/core/src/openjdk/javax/javax/swing/Popup.java classlib6/core/src/openjdk/javax/javax/swing/PopupFactory.java classlib6/core/src/openjdk/javax/javax/swing/ProgressMonitor.java classlib6/core/src/openjdk/javax/javax/swing/ProgressMonitorInputStream.java classlib6/core/src/openjdk/javax/javax/swing/Renderer.java classlib6/core/src/openjdk/javax/javax/swing/RepaintManager.java classlib6/core/src/openjdk/javax/javax/swing/RootPaneContainer.java classlib6/core/src/openjdk/javax/javax/swing/ScrollPaneConstants.java classlib6/core/src/openjdk/javax/javax/swing/ScrollPaneLayout.java classlib6/core/src/openjdk/javax/javax/swing/Scrollable.java classlib6/core/src/openjdk/javax/javax/swing/SingleSelectionModel.java classlib6/core/src/openjdk/javax/javax/swing/SizeRequirements.java classlib6/core/src/openjdk/javax/javax/swing/SizeSequence.java classlib6/core/src/openjdk/javax/javax/swing/SortingFocusTraversalPolicy.java classlib6/core/src/openjdk/javax/javax/swing/SpinnerDateModel.java classlib6/core/src/openjdk/javax/javax/swing/SpinnerListModel.java classlib6/core/src/openjdk/javax/javax/swing/SpinnerModel.java classlib6/core/src/openjdk/javax/javax/swing/SpinnerNumberModel.java classlib6/core/src/openjdk/javax/javax/swing/Spring.java classlib6/core/src/openjdk/javax/javax/swing/SpringLayout.java classlib6/core/src/openjdk/javax/javax/swing/SwingConstants.java classlib6/core/src/openjdk/javax/javax/swing/SwingUtilities.java classlib6/core/src/openjdk/javax/javax/swing/SwingWorker.java classlib6/core/src/openjdk/javax/javax/swing/TablePrintable.java classlib6/core/src/openjdk/javax/javax/swing/Timer.java classlib6/core/src/openjdk/javax/javax/swing/TimerQueue.java classlib6/core/src/openjdk/javax/javax/swing/ToolTipManager.java classlib6/core/src/openjdk/javax/javax/swing/TransferHandler.java classlib6/core/src/openjdk/javax/javax/swing/UIDefaults.java classlib6/core/src/openjdk/javax/javax/swing/UIManager.java classlib6/core/src/openjdk/javax/javax/swing/UnsupportedLookAndFeelException.java classlib6/core/src/openjdk/javax/javax/swing/ViewportLayout.java classlib6/core/src/openjdk/javax/javax/swing/WindowConstants.java classlib6/core/src/openjdk/javax/javax/swing/border/AbstractBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/BevelBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/Border.java classlib6/core/src/openjdk/javax/javax/swing/border/CompoundBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/EmptyBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/EtchedBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/LineBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/MatteBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/SoftBevelBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/TitledBorder.java classlib6/core/src/openjdk/javax/javax/swing/border/package.html classlib6/core/src/openjdk/javax/javax/swing/package.html classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicArrowButton.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicBorders.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicButtonListener.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicCheckBoxUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicColorChooserUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicComboBoxEditor.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicComboBoxRenderer.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicComboBoxUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicComboPopup.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicDesktopIconUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicDesktopPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicDirectoryModel.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicEditorPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicFileChooserUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicGraphicsUtils.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicHTML.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicIconFactory.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicInternalFrameUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicLabelUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicListUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicLookAndFeel.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicMenuBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicMenuItemUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicMenuUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicPanelUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicPasswordFieldUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicPopupMenuUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicProgressBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicRadioButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicRootPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicScrollBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicScrollPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicSeparatorUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicSliderUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicSpinnerUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicSplitPaneDivider.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTabbedPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTableHeaderUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTableUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTextAreaUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTextFieldUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTextPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTextUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicToggleButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicToolBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicToolTipUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTransferable.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicTreeUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/BasicViewportUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/CenterLayout.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/ComboPopup.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/DefaultMenuLayout.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/LazyActionMap.java classlib6/core/src/openjdk/javax/javax/swing/plaf/basic/package.html classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/DefaultMetalTheme.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalBorders.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalBumps.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalCheckBoxIcon.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalCheckBoxUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalComboBoxButton.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalComboBoxEditor.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalComboBoxIcon.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalComboBoxUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalDesktopIconUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalFileChooserUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalFontDesktopProperty.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalHighContrastTheme.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalIconFactory.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalInternalFrameUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalLabelUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalLookAndFeel.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalMenuBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalProgressBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalRadioButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalRootPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalScrollBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalScrollButton.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalScrollPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalSeparatorUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalSliderUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalSplitPaneDivider.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalSplitPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalTabbedPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalTextFieldUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalTheme.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalTitlePane.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalToggleButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalToolBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalToolTipUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalTreeUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/MetalUtils.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/OceanTheme.java classlib6/core/src/openjdk/javax/javax/swing/plaf/metal/package.html classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/ColorType.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/DefaultMenuLayout.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/DefaultSynthStyleFactory.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/ImagePainter.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/ParsedSynthStyle.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/Region.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthArrowButton.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthBorder.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthCheckBoxMenuItemUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthCheckBoxUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthColorChooserUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthComboBoxUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthComboPopup.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthConstants.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthContext.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthDefaultLookup.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthDesktopIconUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthDesktopPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthEditorPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthFormattedTextFieldUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthGraphicsUtils.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthInternalFrameUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthLabelUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthListUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthLookAndFeel.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthMenuBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthMenuItemUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthMenuUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthOptionPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthPainter.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthPanelUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthParser.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthPasswordFieldUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthPopupMenuUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthProgressBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthRadioButtonMenuItemUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthRadioButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthRootPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthScrollBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthScrollPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthSeparatorUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthSliderUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthSpinnerUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthSplitPaneDivider.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthSplitPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthStyle.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthStyleFactory.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthTabbedPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthTableHeaderUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthTableUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthTextAreaUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthTextFieldUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthTextPaneUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthToggleButtonUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthToolBarUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthToolTipUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthTreeUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthViewportUI.java classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/package.html classlib6/core/src/openjdk/javax/javax/swing/table/AbstractTableModel.java classlib6/core/src/openjdk/javax/javax/swing/table/DefaultTableCellRenderer.java classlib6/core/src/openjdk/javax/javax/swing/table/DefaultTableColumnModel.java classlib6/core/src/openjdk/javax/javax/swing/table/DefaultTableModel.java classlib6/core/src/openjdk/javax/javax/swing/table/JTableHeader.java classlib6/core/src/openjdk/javax/javax/swing/table/TableCellEditor.java classlib6/core/src/openjdk/javax/javax/swing/table/TableCellRenderer.java classlib6/core/src/openjdk/javax/javax/swing/table/TableColumn.java classlib6/core/src/openjdk/javax/javax/swing/table/TableColumnModel.java classlib6/core/src/openjdk/javax/javax/swing/table/TableModel.java classlib6/core/src/openjdk/javax/javax/swing/table/package.html classlib6/core/src/openjdk/javax/javax/swing/text/AbstractDocument.java classlib6/core/src/openjdk/javax/javax/swing/text/AbstractWriter.java classlib6/core/src/openjdk/javax/javax/swing/text/AsyncBoxView.java classlib6/core/src/openjdk/javax/javax/swing/text/AttributeSet.java classlib6/core/src/openjdk/javax/javax/swing/text/BadLocationException.java classlib6/core/src/openjdk/javax/javax/swing/text/BoxView.java classlib6/core/src/openjdk/javax/javax/swing/text/Caret.java classlib6/core/src/openjdk/javax/javax/swing/text/ChangedCharSetException.java classlib6/core/src/openjdk/javax/javax/swing/text/ComponentView.java classlib6/core/src/openjdk/javax/javax/swing/text/CompositeView.java classlib6/core/src/openjdk/javax/javax/swing/text/DateFormatter.java classlib6/core/src/openjdk/javax/javax/swing/text/DefaultCaret.java classlib6/core/src/openjdk/javax/javax/swing/text/DefaultEditorKit.java classlib6/core/src/openjdk/javax/javax/swing/text/DefaultFormatter.java classlib6/core/src/openjdk/javax/javax/swing/text/DefaultFormatterFactory.java classlib6/core/src/openjdk/javax/javax/swing/text/DefaultHighlighter.java classlib6/core/src/openjdk/javax/javax/swing/text/DefaultStyledDocument.java classlib6/core/src/openjdk/javax/javax/swing/text/DefaultTextUI.java classlib6/core/src/openjdk/javax/javax/swing/text/Document.java classlib6/core/src/openjdk/javax/javax/swing/text/DocumentFilter.java classlib6/core/src/openjdk/javax/javax/swing/text/EditorKit.java classlib6/core/src/openjdk/javax/javax/swing/text/Element.java classlib6/core/src/openjdk/javax/javax/swing/text/ElementIterator.java classlib6/core/src/openjdk/javax/javax/swing/text/FieldView.java classlib6/core/src/openjdk/javax/javax/swing/text/FlowView.java classlib6/core/src/openjdk/javax/javax/swing/text/GapContent.java classlib6/core/src/openjdk/javax/javax/swing/text/GapVector.java classlib6/core/src/openjdk/javax/javax/swing/text/GlyphPainter1.java classlib6/core/src/openjdk/javax/javax/swing/text/GlyphPainter2.java classlib6/core/src/openjdk/javax/javax/swing/text/GlyphView.java classlib6/core/src/openjdk/javax/javax/swing/text/Highlighter.java classlib6/core/src/openjdk/javax/javax/swing/text/IconView.java classlib6/core/src/openjdk/javax/javax/swing/text/InternationalFormatter.java classlib6/core/src/openjdk/javax/javax/swing/text/JTextComponent.java classlib6/core/src/openjdk/javax/javax/swing/text/Keymap.java classlib6/core/src/openjdk/javax/javax/swing/text/LabelView.java classlib6/core/src/openjdk/javax/javax/swing/text/LayeredHighlighter.java classlib6/core/src/openjdk/javax/javax/swing/text/LayoutQueue.java classlib6/core/src/openjdk/javax/javax/swing/text/MaskFormatter.java classlib6/core/src/openjdk/javax/javax/swing/text/MutableAttributeSet.java classlib6/core/src/openjdk/javax/javax/swing/text/NavigationFilter.java classlib6/core/src/openjdk/javax/javax/swing/text/NumberFormatter.java classlib6/core/src/openjdk/javax/javax/swing/text/ParagraphView.java classlib6/core/src/openjdk/javax/javax/swing/text/PasswordView.java classlib6/core/src/openjdk/javax/javax/swing/text/PlainDocument.java classlib6/core/src/openjdk/javax/javax/swing/text/PlainView.java classlib6/core/src/openjdk/javax/javax/swing/text/Position.java classlib6/core/src/openjdk/javax/javax/swing/text/Segment.java classlib6/core/src/openjdk/javax/javax/swing/text/SegmentCache.java classlib6/core/src/openjdk/javax/javax/swing/text/SimpleAttributeSet.java classlib6/core/src/openjdk/javax/javax/swing/text/StateInvariantError.java classlib6/core/src/openjdk/javax/javax/swing/text/StringContent.java classlib6/core/src/openjdk/javax/javax/swing/text/Style.java classlib6/core/src/openjdk/javax/javax/swing/text/StyleConstants.java classlib6/core/src/openjdk/javax/javax/swing/text/StyleContext.java classlib6/core/src/openjdk/javax/javax/swing/text/StyledDocument.java classlib6/core/src/openjdk/javax/javax/swing/text/StyledEditorKit.java classlib6/core/src/openjdk/javax/javax/swing/text/TabExpander.java classlib6/core/src/openjdk/javax/javax/swing/text/TabSet.java classlib6/core/src/openjdk/javax/javax/swing/text/TabStop.java classlib6/core/src/openjdk/javax/javax/swing/text/TabableView.java classlib6/core/src/openjdk/javax/javax/swing/text/TableView.java classlib6/core/src/openjdk/javax/javax/swing/text/TextAction.java classlib6/core/src/openjdk/javax/javax/swing/text/TextLayoutStrategy.java classlib6/core/src/openjdk/javax/javax/swing/text/Utilities.java classlib6/core/src/openjdk/javax/javax/swing/text/View.java classlib6/core/src/openjdk/javax/javax/swing/text/ViewFactory.java classlib6/core/src/openjdk/javax/javax/swing/text/WhitespaceBasedBreakIterator.java classlib6/core/src/openjdk/javax/javax/swing/text/WrappedPlainView.java classlib6/core/src/openjdk/javax/javax/swing/text/ZoneView.java classlib6/core/src/openjdk/javax/javax/swing/text/html/HTMLEditorKit.java classlib6/core/src/openjdk/javax/javax/swing/text/html/parser/DTD.java classlib6/core/src/openjdk/javax/javax/swing/text/html/parser/ParserDelegator.java classlib6/core/src/openjdk/javax/javax/swing/text/package.html classlib6/core/src/openjdk/javax/javax/swing/tree/AbstractLayoutCache.java classlib6/core/src/openjdk/javax/javax/swing/tree/DefaultMutableTreeNode.java classlib6/core/src/openjdk/javax/javax/swing/tree/DefaultTreeCellEditor.java classlib6/core/src/openjdk/javax/javax/swing/tree/DefaultTreeCellRenderer.java classlib6/core/src/openjdk/javax/javax/swing/tree/DefaultTreeModel.java classlib6/core/src/openjdk/javax/javax/swing/tree/DefaultTreeSelectionModel.java classlib6/core/src/openjdk/javax/javax/swing/tree/ExpandVetoException.java classlib6/core/src/openjdk/javax/javax/swing/tree/FixedHeightLayoutCache.java classlib6/core/src/openjdk/javax/javax/swing/tree/MutableTreeNode.java classlib6/core/src/openjdk/javax/javax/swing/tree/RowMapper.java classlib6/core/src/openjdk/javax/javax/swing/tree/TreeCellEditor.java classlib6/core/src/openjdk/javax/javax/swing/tree/TreeCellRenderer.java classlib6/core/src/openjdk/javax/javax/swing/tree/TreeModel.java classlib6/core/src/openjdk/javax/javax/swing/tree/TreeNode.java classlib6/core/src/openjdk/javax/javax/swing/tree/TreePath.java classlib6/core/src/openjdk/javax/javax/swing/tree/TreeSelectionModel.java classlib6/core/src/openjdk/javax/javax/swing/tree/VariableHeightLayoutCache.java classlib6/core/src/openjdk/javax/javax/swing/tree/package.html classlib6/core/src/openjdk/javax/javax/xml/XMLConstants.java classlib6/core/src/openjdk/javax/javax/xml/datatype/DatatypeFactory.java classlib6/core/src/openjdk/javax/javax/xml/datatype/FactoryFinder.java classlib6/core/src/openjdk/javax/javax/xml/namespace/QName.java classlib6/core/src/openjdk/javax/javax/xml/parsers/DocumentBuilderFactory.java classlib6/core/src/openjdk/javax/javax/xml/parsers/FactoryConfigurationError.java classlib6/core/src/openjdk/javax/javax/xml/parsers/FactoryFinder.java classlib6/core/src/openjdk/javax/javax/xml/parsers/SAXParserFactory.java classlib6/core/src/openjdk/javax/javax/xml/stream/EventFilter.java classlib6/core/src/openjdk/javax/javax/xml/stream/FactoryConfigurationError.java classlib6/core/src/openjdk/javax/javax/xml/stream/FactoryFinder.java classlib6/core/src/openjdk/javax/javax/xml/stream/Location.java classlib6/core/src/openjdk/javax/javax/xml/stream/SecuritySupport.java classlib6/core/src/openjdk/javax/javax/xml/stream/StreamFilter.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLEventFactory.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLEventReader.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLEventWriter.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLInputFactory.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLOutputFactory.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLReporter.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLResolver.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLStreamConstants.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLStreamException.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLStreamReader.java classlib6/core/src/openjdk/javax/javax/xml/stream/XMLStreamWriter.java classlib6/core/src/openjdk/javax/javax/xml/transform/FactoryFinder.java classlib6/core/src/openjdk/javax/javax/xml/transform/TransformerFactoryConfigurationError.java Added Paths: ----------- classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthMenuItemLayoutHelper.java Modified: classlib6/core/src/openjdk/javax/javax/accessibility/AccessibleResourceBundle.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/accessibility/AccessibleResourceBundle.java 2011-03-05 11:09:31 UTC (rev 5797) +++ classlib6/core/src/openjdk/javax/javax/accessibility/AccessibleResourceBundle.java 2011-03-05 11:28:28 UTC (rev 5798) @@ -44,14 +44,10 @@ * localized display strings. */ public Object[][] getContents() { - return contents; - } + // The table holding the mapping between the programmatic keys + // and the display strings for the en_US locale. + return new Object[][] { - /** - * The table holding the mapping between the programmatic keys - * and the display strings for the en_US locale. - */ - static final Object[][] contents = { // LOCALIZE THIS // Role names // { "application","application" }, @@ -152,4 +148,5 @@ { "horizontal","horizontal" } // END OF MATERIAL TO LOCALIZE }; + } } Modified: classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitor.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitor.java 2011-03-05 11:09:31 UTC (rev 5797) +++ classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitor.java 2011-03-05 11:28:28 UTC (rev 5798) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 javax.management.monitor; @@ -265,6 +265,7 @@ * @return The derived gauge of the specified object. * */ + @Override public synchronized Number getDerivedGauge(ObjectName object) { return (Number) super.getDerivedGauge(object); } @@ -280,6 +281,7 @@ * @return The derived gauge timestamp of the specified object. * */ + @Override public synchronized long getDerivedGaugeTimeStamp(ObjectName object) { return super.getDerivedGaugeTimeStamp(object); } @@ -595,8 +597,9 @@ * name of the Java class of the notification and the notification * types sent by the counter monitor. */ + @Override public MBeanNotificationInfo[] getNotificationInfo() { - return notifsInfo; + return notifsInfo.clone(); } /* Modified: classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitorMBean.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitorMBean.java 2011-03-05 11:09:31 UTC (rev 5797) +++ classlib6/core/src/openjdk/javax/javax/management/monitor/CounterMonitorMBean.java 2011-03-05 11:28:28 UTC (rev 5798) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 javax.management.monitor; Modified: classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitor.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitor.java 2011-03-05 11:09:31 UTC (rev 5797) +++ classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitor.java 2011-03-05 11:28:28 UTC (rev 5798) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 javax.management.monitor; @@ -258,6 +258,7 @@ * @return The derived gauge of the specified object. * */ + @Override public synchronized Number getDerivedGauge(ObjectName object) { return (Number) super.getDerivedGauge(object); } @@ -273,6 +274,7 @@ * @return The derived gauge timestamp of the specified object. * */ + @Override public synchronized long getDerivedGaugeTimeStamp(ObjectName object) { return super.getDerivedGaugeTimeStamp(object); } @@ -477,8 +479,9 @@ * name of the Java class of the notification and the notification * types sent by the gauge monitor. */ + @Override public MBeanNotificationInfo[] getNotificationInfo() { - return notifsInfo; + return notifsInfo.clone(); } /* Modified: classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitorMBean.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitorMBean.java 2011-03-05 11:09:31 UTC (rev 5797) +++ classlib6/core/src/openjdk/javax/javax/management/monitor/GaugeMonitorMBean.java 2011-03-05 11:28:28 UTC (rev 5798) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 javax.management.monitor; Modified: classlib6/core/src/openjdk/javax/javax/management/monitor/Monitor.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/management/monitor/Monitor.java 2011-03-05 11:09:31 UTC (rev 5797) +++ classlib6/core/src/openjdk/javax/javax/management/monitor/Monitor.java 2011-03-05 11:28:28 UTC (rev 5798) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 javax.management.monitor; @@ -37,9 +37,11 @@ import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.ProtectionDomain; import java.util.List; +import java.util.Map; +import java.util.WeakHashMap; import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.LinkedBlockingQueue; @@ -170,7 +172,10 @@ /** * AccessControlContext of the Monitor.start() caller. */ - private AccessControlContext acc; + private static final AccessControlContext noPermissionsACC = + new AccessControlContext( + new ProtectionDomain[] {new ProtectionDomain(null, null)}); + private volatile AccessControlContext acc = noPermissionsACC; /** * Scheduler Service. @@ -180,14 +185,20 @@ new DaemonThreadFactory("Scheduler")); /** - * Maximum Pool Size + * Map containing the thread pool executor per thread group. */ - private static final int maximumPoolSize; + private static final Map<ThreadPoolExecutor, Void> executors = + new WeakHashMap<ThreadPoolExecutor, Void>(); /** - * Executor Service. + * Lock for executors map. */ - private static final ExecutorService executor; + private static final Object executorsLock = new Object(); + + /** + * Maximum Pool Size + */ + private static final int maximumPoolSize; static { final String maximumPoolSizeSysProp = "jmx.x.monitor.maximum.pool.size"; final String maximumPoolSizeStr = AccessController.doPrivileged( @@ -217,22 +228,9 @@ maximumPoolSize = maximumPoolSizeTmp; } } - executor = new ThreadPoolExecutor( - maximumPoolSize, - maximumPoolSize, - 60L, - TimeUnit.SECONDS, - new LinkedBlockingQueue<Runnable>(), - new DaemonThreadFactory("Executor")); - ((ThreadPoolExecutor)executor).allowCoreThreadTimeOut(true); } /** - * Monitor task to be executed by the Executor Service. - */ - private final MonitorTask monitorTask = new MonitorTask(); - - /** * Future associated to the current monitor task. */ private Future<?> monitorFuture; @@ -240,7 +238,7 @@ /** * Scheduler task to be executed by the Scheduler Service. */ - private final SchedulerTask schedulerTask = new SchedulerTask(monitorTask); + private final SchedulerTask schedulerTask = new SchedulerTask(); /** * ScheduledFuture associated to the current scheduler task. @@ -373,7 +371,7 @@ /** * Constant used to initialize all the numeric values. */ - static final Integer INTEGER_ZERO = new Integer(0); + static final Integer INTEGER_ZERO = 0; /* @@ -523,7 +521,7 @@ // ObservedObject o = createObservedObject(object); o.setAlreadyNotified(RESET_FLAGS_ALREADY_NOTIFIED); - o.setDerivedGauge(null); + o.setDerivedGauge(INTEGER_ZERO); o.setDerivedGaugeTimeStamp(System.currentTimeMillis()); observedObjects.add(o); @@ -726,6 +724,7 @@ // Start the scheduler. // cleanupFutures(); + schedulerTask.setMonitorTask(new MonitorTask()); schedulerFuture = scheduler.schedule(schedulerTask, getGranularityPeriod(), TimeUnit.MILLISECONDS); @@ -755,7 +754,7 @@ // Reset the AccessControlContext. // - acc = null; + acc = noPermissionsACC; // Reset the complex type attribute information // such that it is recalculated again. @@ -1505,7 +1504,7 @@ */ private class SchedulerTask implements Runnable { - private Runnable task = null; + private MonitorTask task; /* * ------------------------------------------ @@ -1513,7 +1512,16 @@ * ------------------------------------------ */ - public SchedulerTask(Runnable task) { + public SchedulerTask() { + } + + /* + * ------------------------------------------ + * GETTERS/SETTERS + * ------------------------------------------ + */ + + public void setMonitorTask(MonitorTask task) { this.task = task; } @@ -1525,7 +1533,7 @@ public void run() { synchronized (Monitor.this) { - Monitor.this.monitorFuture = executor.submit(task); + Monitor.this.monitorFuture = task.submit(); } } } @@ -1538,6 +1546,8 @@ */ private class MonitorTask implements Runnable { + private ThreadPoolExecutor executor; + /* * ------------------------------------------ * CONSTRUCTORS @@ -1545,6 +1555,38 @@ */ public MonitorTask() { + // Find out if there's already an existing executor for the calling + // thread and reuse it. Otherwise, create a new one and store it in + // the executors map. If there is a SecurityManager, the group of + // System.getSecurityManager() is used, else the group of the thread + // instantiating this MonitorTask, i.e. the group of the thread that + // calls "Monitor.start()". + SecurityManager s = System.getSecurityManager(); + ThreadGroup group = (s != null) ? s.getThreadGroup() : + Thread.currentThread().getThreadGroup(); + synchronized (executorsLock) { + for (ThreadPoolExecutor e : executors.keySet()) { + DaemonThreadFactory tf = + (DaemonThreadFactory) e.getThreadFactory(); + ThreadGroup tg = tf.getThreadGroup(); + if (tg == group) { + executor = e; + break; + } + } + if (executor == null) { + executor = new ThreadPoolExecutor( + maximumPoolSize, + maximumPoolSize, + 60L, + TimeUnit.SECONDS, + new LinkedBlockingQueue<Runnable>(), + new DaemonThreadFactory("ThreadGroup<" + + group.getName() + "> Executor", group)); + executor.allowCoreThreadTimeOut(true); + executors.put(executor, null); + } + } } /* @@ -1553,12 +1595,18 @@ * ------------------------------------------ */ + public Future<?> submit() { + return executor.submit(this); + } + public void run() { final ScheduledFuture<?> sf; + final AccessControlContext ac; synchronized (Monitor.this) { sf = Monitor.this.schedulerFuture; + ac = Monitor.this.acc; } - AccessController.doPrivileged(new PrivilegedAction<Void>() { + PrivilegedAction<Void> action = new PrivilegedAction<Void>() { public Void run() { if (Monitor.this.isActive()) { final int an[] = alreadyNotifieds; @@ -1571,7 +1619,11 @@ } return null; } - }, Monitor.this.acc); + }; + if (ac == null) { + throw new SecurityException("AccessControlContext cannot be null"); + } + AccessController.doPrivileged(action, ac); synchronized (Monitor.this) { if (Monitor.this.isActive() && Monitor.this.schedulerFuture == sf) { @@ -1611,6 +1663,15 @@ namePrefix = "JMX Monitor " + poolName + " Pool [Thread-"; } + public DaemonThreadFactory(String poolName, ThreadGroup threadGroup) { + group = threadGroup; + namePrefix = "JMX Monitor " + poolName + " Pool [Thread-"; + } + + public ThreadGroup getThreadGroup() { + return group; + } + public Thread newThread(Runnable r) { Thread t = new Thread(group, r, Modified: classlib6/core/src/openjdk/javax/javax/management/monitor/MonitorMBean.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/management/monitor/MonitorMBean.java 2011-03-05 11:09:31 UTC (rev 5797) +++ classlib6/core/src/openjdk/javax/javax/management/monitor/MonitorMBean.java 2011-03-05 11:28:28 UTC (rev 5798) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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 Foundat... [truncated message content] |
From: <ls...@us...> - 2011-03-05 11:09:41
|
Revision: 5797 http://jnode.svn.sourceforge.net/jnode/?rev=5797&view=rev Author: lsantha Date: 2011-03-05 11:09:31 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/java/java/awt/color/CMMException.java classlib6/core/src/openjdk/java/java/awt/color/ColorSpace.java classlib6/core/src/openjdk/java/java/awt/color/ICC_ColorSpace.java classlib6/core/src/openjdk/java/java/awt/color/ICC_Profile.java classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileGray.java classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileRGB.java classlib6/core/src/openjdk/java/java/awt/color/ProfileDataException.java classlib6/core/src/openjdk/java/java/awt/color/package.html classlib6/core/src/openjdk/java/java/awt/image/IndexColorModel.java classlib6/core/src/openjdk/java/java/beans/EventHandler.java classlib6/core/src/openjdk/java/java/beans/Introspector.java classlib6/core/src/openjdk/java/java/beans/MetaData.java classlib6/core/src/openjdk/java/java/beans/Statement.java classlib6/core/src/openjdk/java/java/math/BigDecimal.java classlib6/core/src/openjdk/java/java/math/BigInteger.java classlib6/core/src/openjdk/java/java/math/BitSieve.java classlib6/core/src/openjdk/java/java/math/MathContext.java classlib6/core/src/openjdk/java/java/math/MutableBigInteger.java classlib6/core/src/openjdk/java/java/math/SignedMutableBigInteger.java classlib6/core/src/openjdk/java/java/security/AccessControlException.java classlib6/core/src/openjdk/java/java/security/AlgorithmParameterGenerator.java classlib6/core/src/openjdk/java/java/security/AlgorithmParameterGeneratorSpi.java classlib6/core/src/openjdk/java/java/security/AlgorithmParameters.java classlib6/core/src/openjdk/java/java/security/AlgorithmParametersSpi.java classlib6/core/src/openjdk/java/java/security/AllPermission.java classlib6/core/src/openjdk/java/java/security/AuthProvider.java classlib6/core/src/openjdk/java/java/security/BasicPermission.java classlib6/core/src/openjdk/java/java/security/Certificate.java classlib6/core/src/openjdk/java/java/security/CodeSigner.java classlib6/core/src/openjdk/java/java/security/CodeSource.java classlib6/core/src/openjdk/java/java/security/DigestException.java classlib6/core/src/openjdk/java/java/security/DigestInputStream.java classlib6/core/src/openjdk/java/java/security/DigestOutputStream.java classlib6/core/src/openjdk/java/java/security/DomainCombiner.java classlib6/core/src/openjdk/java/java/security/GeneralSecurityException.java classlib6/core/src/openjdk/java/java/security/Guard.java classlib6/core/src/openjdk/java/java/security/GuardedObject.java classlib6/core/src/openjdk/java/java/security/Identity.java classlib6/core/src/openjdk/java/java/security/IdentityScope.java classlib6/core/src/openjdk/java/java/security/InvalidAlgorithmParameterException.java classlib6/core/src/openjdk/java/java/security/InvalidKeyException.java classlib6/core/src/openjdk/java/java/security/InvalidParameterException.java classlib6/core/src/openjdk/java/java/security/Key.java classlib6/core/src/openjdk/java/java/security/KeyException.java classlib6/core/src/openjdk/java/java/security/KeyFactory.java classlib6/core/src/openjdk/java/java/security/KeyFactorySpi.java classlib6/core/src/openjdk/java/java/security/KeyManagementException.java classlib6/core/src/openjdk/java/java/security/KeyPair.java classlib6/core/src/openjdk/java/java/security/KeyPairGenerator.java classlib6/core/src/openjdk/java/java/security/KeyPairGeneratorSpi.java classlib6/core/src/openjdk/java/java/security/KeyRep.java classlib6/core/src/openjdk/java/java/security/KeyStore.java classlib6/core/src/openjdk/java/java/security/KeyStoreException.java classlib6/core/src/openjdk/java/java/security/KeyStoreSpi.java classlib6/core/src/openjdk/java/java/security/MessageDigest.java classlib6/core/src/openjdk/java/java/security/MessageDigestSpi.java classlib6/core/src/openjdk/java/java/security/NoSuchAlgorithmException.java classlib6/core/src/openjdk/java/java/security/NoSuchProviderException.java classlib6/core/src/openjdk/java/java/security/Permission.java classlib6/core/src/openjdk/java/java/security/PermissionCollection.java classlib6/core/src/openjdk/java/java/security/Permissions.java classlib6/core/src/openjdk/java/java/security/Policy.java classlib6/core/src/openjdk/java/java/security/Principal.java classlib6/core/src/openjdk/java/java/security/PrivateKey.java classlib6/core/src/openjdk/java/java/security/PrivilegedAction.java classlib6/core/src/openjdk/java/java/security/PrivilegedActionException.java classlib6/core/src/openjdk/java/java/security/PrivilegedExceptionAction.java classlib6/core/src/openjdk/java/java/security/ProtectionDomain.java classlib6/core/src/openjdk/java/java/security/Provider.java classlib6/core/src/openjdk/java/java/security/ProviderException.java classlib6/core/src/openjdk/java/java/security/PublicKey.java classlib6/core/src/openjdk/java/java/security/SecureClassLoader.java classlib6/core/src/openjdk/java/java/security/SecureRandom.java classlib6/core/src/openjdk/java/java/security/SecureRandomSpi.java classlib6/core/src/openjdk/java/java/security/Security.java classlib6/core/src/openjdk/java/java/security/SecurityPermission.java classlib6/core/src/openjdk/java/java/security/Signature.java classlib6/core/src/openjdk/java/java/security/SignatureException.java classlib6/core/src/openjdk/java/java/security/SignatureSpi.java classlib6/core/src/openjdk/java/java/security/SignedObject.java classlib6/core/src/openjdk/java/java/security/Signer.java classlib6/core/src/openjdk/java/java/security/Timestamp.java classlib6/core/src/openjdk/java/java/security/UnrecoverableEntryException.java classlib6/core/src/openjdk/java/java/security/UnrecoverableKeyException.java classlib6/core/src/openjdk/java/java/security/UnresolvedPermission.java classlib6/core/src/openjdk/java/java/security/UnresolvedPermissionCollection.java classlib6/core/src/openjdk/java/java/util/AbstractCollection.java classlib6/core/src/openjdk/java/java/util/AbstractList.java classlib6/core/src/openjdk/java/java/util/AbstractMap.java classlib6/core/src/openjdk/java/java/util/AbstractQueue.java classlib6/core/src/openjdk/java/java/util/AbstractSequentialList.java classlib6/core/src/openjdk/java/java/util/AbstractSet.java classlib6/core/src/openjdk/java/java/util/ArrayDeque.java classlib6/core/src/openjdk/java/java/util/ArrayList.java classlib6/core/src/openjdk/java/java/util/Arrays.java classlib6/core/src/openjdk/java/java/util/Calendar.java classlib6/core/src/openjdk/java/java/util/Collection.java classlib6/core/src/openjdk/java/java/util/Collections.java classlib6/core/src/openjdk/java/java/util/Comparator.java classlib6/core/src/openjdk/java/java/util/ConcurrentModificationException.java classlib6/core/src/openjdk/java/java/util/Currency.java classlib6/core/src/openjdk/java/java/util/Date.java classlib6/core/src/openjdk/java/java/util/Deque.java classlib6/core/src/openjdk/java/java/util/Dictionary.java classlib6/core/src/openjdk/java/java/util/DuplicateFormatFlagsException.java classlib6/core/src/openjdk/java/java/util/EmptyStackException.java classlib6/core/src/openjdk/java/java/util/EnumMap.java classlib6/core/src/openjdk/java/java/util/EnumSet.java classlib6/core/src/openjdk/java/java/util/Enumeration.java classlib6/core/src/openjdk/java/java/util/EventListener.java classlib6/core/src/openjdk/java/java/util/EventListenerProxy.java classlib6/core/src/openjdk/java/java/util/EventObject.java classlib6/core/src/openjdk/java/java/util/FormatFlagsConversionMismatchException.java classlib6/core/src/openjdk/java/java/util/Formattable.java classlib6/core/src/openjdk/java/java/util/FormattableFlags.java classlib6/core/src/openjdk/java/java/util/Formatter.java classlib6/core/src/openjdk/java/java/util/FormatterClosedException.java classlib6/core/src/openjdk/java/java/util/GregorianCalendar.java classlib6/core/src/openjdk/java/java/util/HashMap.java classlib6/core/src/openjdk/java/java/util/HashSet.java classlib6/core/src/openjdk/java/java/util/Hashtable.java classlib6/core/src/openjdk/java/java/util/IdentityHashMap.java classlib6/core/src/openjdk/java/java/util/IllegalFormatCodePointException.java classlib6/core/src/openjdk/java/java/util/IllegalFormatConversionException.java classlib6/core/src/openjdk/java/java/util/IllegalFormatException.java classlib6/core/src/openjdk/java/java/util/IllegalFormatFlagsException.java classlib6/core/src/openjdk/java/java/util/IllegalFormatPrecisionException.java classlib6/core/src/openjdk/java/java/util/IllegalFormatWidthException.java classlib6/core/src/openjdk/java/java/util/InputMismatchException.java classlib6/core/src/openjdk/java/java/util/InvalidPropertiesFormatException.java classlib6/core/src/openjdk/java/java/util/Iterator.java classlib6/core/src/openjdk/java/java/util/JumboEnumSet.java classlib6/core/src/openjdk/java/java/util/LinkedHashMap.java classlib6/core/src/openjdk/java/java/util/LinkedHashSet.java classlib6/core/src/openjdk/java/java/util/LinkedList.java classlib6/core/src/openjdk/java/java/util/List.java classlib6/core/src/openjdk/java/java/util/ListIterator.java classlib6/core/src/openjdk/java/java/util/ListResourceBundle.java classlib6/core/src/openjdk/java/java/util/Locale.java classlib6/core/src/openjdk/java/java/util/LocaleISOData.java classlib6/core/src/openjdk/java/java/util/Map.java classlib6/core/src/openjdk/java/java/util/MissingFormatArgumentException.java classlib6/core/src/openjdk/java/java/util/MissingFormatWidthException.java classlib6/core/src/openjdk/java/java/util/MissingResourceException.java classlib6/core/src/openjdk/java/java/util/NavigableMap.java classlib6/core/src/openjdk/java/java/util/NavigableSet.java classlib6/core/src/openjdk/java/java/util/NoSuchElementException.java classlib6/core/src/openjdk/java/java/util/Observable.java classlib6/core/src/openjdk/java/java/util/Observer.java classlib6/core/src/openjdk/java/java/util/PriorityQueue.java classlib6/core/src/openjdk/java/java/util/Properties.java classlib6/core/src/openjdk/java/java/util/PropertyPermission.java classlib6/core/src/openjdk/java/java/util/PropertyResourceBundle.java classlib6/core/src/openjdk/java/java/util/Queue.java classlib6/core/src/openjdk/java/java/util/RandomAccess.java classlib6/core/src/openjdk/java/java/util/RegularEnumSet.java classlib6/core/src/openjdk/java/java/util/ResourceBundle.java classlib6/core/src/openjdk/java/java/util/Scanner.java classlib6/core/src/openjdk/java/java/util/Set.java classlib6/core/src/openjdk/java/java/util/SimpleTimeZone.java classlib6/core/src/openjdk/java/java/util/SortedMap.java classlib6/core/src/openjdk/java/java/util/SortedSet.java classlib6/core/src/openjdk/java/java/util/Stack.java classlib6/core/src/openjdk/java/java/util/StringTokenizer.java classlib6/core/src/openjdk/java/java/util/TimeZone.java classlib6/core/src/openjdk/java/java/util/Timer.java classlib6/core/src/openjdk/java/java/util/TimerTask.java classlib6/core/src/openjdk/java/java/util/TooManyListenersException.java classlib6/core/src/openjdk/java/java/util/TreeMap.java classlib6/core/src/openjdk/java/java/util/TreeSet.java classlib6/core/src/openjdk/java/java/util/UUID.java classlib6/core/src/openjdk/java/java/util/UnknownFormatConversionException.java classlib6/core/src/openjdk/java/java/util/UnknownFormatFlagsException.java classlib6/core/src/openjdk/java/java/util/Vector.java classlib6/core/src/openjdk/java/java/util/WeakHashMap.java classlib6/core/src/openjdk/java/java/util/XMLUtils.java classlib6/core/src/openjdk/java/java/util/concurrent/ConcurrentSkipListMap.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/AbstractOwnableSynchronizer.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/AbstractQueuedSynchronizer.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/Condition.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/Lock.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/LockSupport.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/ReadWriteLock.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/ReentrantLock.java classlib6/core/src/openjdk/java/java/util/concurrent/locks/ReentrantReadWriteLock.java classlib6/core/src/openjdk/java/java/util/logging/LogManager.java classlib6/core/src/openjdk/java/java/util/logging/Logger.java classlib6/core/src/openjdk/java/java/util/package.html Modified: classlib6/core/src/openjdk/java/java/awt/color/CMMException.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/CMMException.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/CMMException.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -3,9 +3,9 @@ * * 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -17,9 +17,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /* Modified: classlib6/core/src/openjdk/java/java/awt/color/ColorSpace.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/ColorSpace.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/ColorSpace.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,12 +1,12 @@ /* - * Portions Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /********************************************************************** Modified: classlib6/core/src/openjdk/java/java/awt/color/ICC_ColorSpace.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/ICC_ColorSpace.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/ICC_ColorSpace.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,12 +1,12 @@ /* - * Portions Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /********************************************************************** Modified: classlib6/core/src/openjdk/java/java/awt/color/ICC_Profile.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/ICC_Profile.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/ICC_Profile.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,12 +1,12 @@ /* - * Portions Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /********************************************************************** @@ -945,14 +945,14 @@ */ public static ICC_Profile getInstance(String fileName) throws IOException { ICC_Profile thisProfile; - FileInputStream fis; + FileInputStream fis = null; - SecurityManager security = System.getSecurityManager(); - if (security != null) { - security.checkRead(fileName); + + File f = getProfileFile(fileName); + if (f != null) { + fis = new FileInputStream(f); } - - if ((fis = openProfile(fileName)) == null) { + if (fis == null) { throw new IOException("Cannot open file " + fileName); } @@ -1066,11 +1066,22 @@ void activateDeferredProfile() { byte profileData[]; FileInputStream fis; - String fileName = deferralInfo.filename; + final String fileName = deferralInfo.filename; profileActivator = null; deferralInfo = null; - if ((fis = openProfile(fileName)) == null) { + PrivilegedAction<FileInputStream> pa = new PrivilegedAction<FileInputStream>() { + public FileInputStream run() { + File f = getStandardProfileFile(fileName); + if (f != null) { + try { + return new FileInputStream(f); + } catch (FileNotFoundException e) {} + } + return null; + } + }; + if ((fis = AccessController.doPrivileged(pa)) == null) { throw new IllegalArgumentException("Cannot open file " + fileName); } try { @@ -1765,66 +1776,88 @@ * available, such as a profile for sRGB. Built-in profiles use .pf as * the file name extension for profiles, e.g. sRGB.pf. */ - private static FileInputStream openProfile(final String fileName) { - return (FileInputStream)java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public Object run() { - return privilegedOpenProfile(fileName); - } - }); - } - - /* - * this version is called from doPrivileged in privilegedOpenProfile. - * the whole method is privileged! - */ - private static FileInputStream privilegedOpenProfile(String fileName) { - FileInputStream fis = null; + private static File getProfileFile(String fileName) { String path, dir, fullPath; File f = new File(fileName); /* try absolute file name */ - + if (f.isAbsolute()) { + /* Rest of code has little sense for an absolute pathname, + so return here. */ + return f.isFile() ? f : null; + } if ((!f.isFile()) && ((path = System.getProperty("java.iccprofile.path")) != null)){ /* try relative to java.iccprofile.path */ StringTokenizer st = new StringTokenizer(path, File.pathSeparator); - while (st.hasMoreTokens() && (!f.isFile())) { + while (st.hasMoreTokens() && ((f == null) || (!f.isFile()))) { dir = st.nextToken(); fullPath = dir + File.separatorChar + fileName; f = new File(fullPath); + if (!isChildOf(f, dir)) { + f = null; } + } } - if ((!f.isFile()) && + if (((f == null) || (!f.isFile())) && ((path = System.getProperty("java.class.path")) != null)) { /* try relative to java.class.path */ StringTokenizer st = new StringTokenizer(path, File.pathSeparator); - while (st.hasMoreTokens() && (!f.isFile())) { + while (st.hasMoreTokens() && ((f == null) || (!f.isFile()))) { dir = st.nextToken(); fullPath = dir + File.separatorChar + fileName; f = new File(fullPath); + if (!isChildOf(f, dir)) { + f = null; } } + } + if ((f == null) || (!f.isFile())) { + /* try the directory of built-in profiles */ + f = getStandardProfileFile(fileName); + } + if (f != null && f.isFile()) { + return f; + } + return null; + } - if (!f.isFile()) { /* try the directory of built-in profiles */ - dir = System.getProperty("java.home") + + /** + * Returns a file object corresponding to a built-in profile + * specified by fileName. + * If there is no built-in profile with such name, then the method + * returns null. + */ + private static File getStandardProfileFile(String fileName) { + String dir = System.getProperty("java.home") + File.separatorChar + "lib" + File.separatorChar + "cmm"; - fullPath = dir + File.separatorChar + fileName; - f = new File(fullPath); + String fullPath = dir + File.separatorChar + fileName; + File f = new File(fullPath); + return (f.isFile() && isChildOf(f, dir)) ? f : null; } - if (f.isFile()) { + /** + * Checks whether given file resides inside give directory. + */ + private static boolean isChildOf(File f, String dirName) { try { - fis = new FileInputStream(f); - } catch (FileNotFoundException e) { + File dir = new File(dirName); + String canonicalDirName = dir.getCanonicalPath(); + if (!canonicalDirName.endsWith(File.separator)) { + canonicalDirName += File.separator; } + String canonicalFileName = f.getCanonicalPath(); + return canonicalFileName.startsWith(canonicalDirName); + } catch (IOException e) { + /* we do not expect the IOException here, because invocation + * of this function is always preceeded by isFile() call. + */ + return false; } - return fis; } - /* * Serialization support. * Modified: classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileGray.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileGray.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileGray.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,12 +1,12 @@ /* - * Portions Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /********************************************************************** Modified: classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileRGB.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileRGB.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/ICC_ProfileRGB.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,12 +1,12 @@ /* - * Portions Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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. */ /********************************************************************** Modified: classlib6/core/src/openjdk/java/java/awt/color/ProfileDataException.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/ProfileDataException.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/ProfileDataException.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,12 +1,12 @@ /* - * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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 java.awt.color; Modified: classlib6/core/src/openjdk/java/java/awt/color/package.html =================================================================== --- classlib6/core/src/openjdk/java/java/awt/color/package.html 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/color/package.html 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,12 +1,12 @@ <!-- - Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + Copyright (c) 1998, 1999, 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. Sun designates this + published by the Free Software Foundation. Oracle designates this particular file as subject to the "Classpath" exception as provided - by Sun in the LICENSE file that accompanied this code. + 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 @@ -18,9 +18,9 @@ 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - CA 95054 USA or visit www.sun.com if you need additional information or - have any questions. + 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. --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> Modified: classlib6/core/src/openjdk/java/java/awt/image/IndexColorModel.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/image/IndexColorModel.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/awt/image/IndexColorModel.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2010, 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 @@ -129,6 +129,8 @@ private boolean allgrayopaque; private BigInteger validBits; + private sun.awt.image.BufImgSurfaceData.ICMColorData colorData = null; + private static int[] opaqueBits = {8, 8, 8}; private static int[] alphaBits = {8, 8, 8, 8}; @@ -1511,7 +1513,6 @@ * longer referenced. */ public void finalize() { - sun.awt.image.BufImgSurfaceData.freeNativeICMData(this); } /** Modified: classlib6/core/src/openjdk/java/java/beans/EventHandler.java =================================================================== --- classlib6/core/src/openjdk/java/java/beans/EventHandler.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/beans/EventHandler.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -32,7 +32,6 @@ import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.EventObject; import sun.reflect.misc.MethodUtil; /** @@ -279,9 +278,9 @@ public class EventHandler implements InvocationHandler { private Object target; private String action; - private String eventPropertyName; - private String listenerMethodName; - private AccessControlContext acc; + private final String eventPropertyName; + private final String listenerMethodName; + private final AccessControlContext acc = AccessController.getContext(); /** * Creates a new <code>EventHandler</code> object; @@ -309,7 +308,6 @@ * @see #getListenerMethodName */ public EventHandler(Object target, String action, String eventPropertyName, String listenerMethodName) { - this.acc = AccessController.getContext(); this.target = target; this.action = action; if (target == null) { @@ -421,7 +419,11 @@ * @see EventHandler */ public Object invoke(final Object proxy, final Method method, final Object[] arguments) { - return AccessController.doPrivileged(new PrivilegedAction() { + AccessControlContext acc = this.acc; + if ((acc == null) && (System.getSecurityManager() != null)) { + throw new SecurityException("AccessControlContext is not set"); + } + return AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { return invokeInternal(proxy, method, arguments); } @@ -481,7 +483,10 @@ throw new RuntimeException(ex); } catch (InvocationTargetException ex) { - throw new RuntimeException(ex.getTargetException()); + Throwable th = ex.getTargetException(); + throw (th instanceof RuntimeException) + ? (RuntimeException) th + : new RuntimeException(th); } } return null; Modified: classlib6/core/src/openjdk/java/java/beans/Introspector.java =================================================================== --- classlib6/core/src/openjdk/java/java/beans/Introspector.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/beans/Introspector.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -45,6 +45,7 @@ import java.util.List; import java.util.WeakHashMap; import java.util.TreeMap; +import sun.awt.AppContext; import sun.reflect.misc.ReflectUtil; /** @@ -111,9 +112,9 @@ // Static Caches to speed up introspection. private static Map declaredMethodCache = Collections.synchronizedMap(new WeakHashMap()); - private static Map beanInfoCache = - Collections.synchronizedMap(new WeakHashMap()); + private static final Object BEANINFO_CACHE = new Object(); + private Class beanClass; private BeanInfo explicitBeanInfo; private BeanInfo superBeanInfo; @@ -175,10 +176,18 @@ if (!ReflectUtil.isPackageAccessible(beanClass)) { return (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo(); } - BeanInfo bi = (BeanInfo)beanInfoCache.get(beanClass); + Map<Class<?>, BeanInfo> map; + synchronized (BEANINFO_CACHE) { + map = (Map<Class<?>, BeanInfo>) AppContext.getAppContext().get(BEANINFO_CACHE); + if (map == null) { + map = Collections.synchronizedMap(new WeakHashMap<Class<?>, BeanInfo>()); + AppContext.getAppContext().put(BEANINFO_CACHE, map); + } + } + BeanInfo bi = map.get(beanClass); if (bi == null) { bi = (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo(); - beanInfoCache.put(beanClass, bi); + map.put(beanClass, bi); } return bi; } @@ -327,7 +336,10 @@ */ public static void flushCaches() { - beanInfoCache.clear(); + Map map = (Map) AppContext.getAppContext().get(BEANINFO_CACHE); + if (map != null) { + map.clear(); + } declaredMethodCache.clear(); } @@ -350,7 +362,10 @@ if (clz == null) { throw new NullPointerException(); } - beanInfoCache.remove(clz); + Map map = (Map) AppContext.getAppContext().get(BEANINFO_CACHE); + if (map != null) { + map.remove(clz); + } declaredMethodCache.remove(clz); } Modified: classlib6/core/src/openjdk/java/java/beans/MetaData.java =================================================================== --- classlib6/core/src/openjdk/java/java/beans/MetaData.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/beans/MetaData.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -331,31 +331,6 @@ return (oldC.size() == newC.size()) && oldC.containsAll(newC); } - static Object getPrivateField(final Object instance, final String name) { - return AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - Class type = instance.getClass(); - while ( true ) { - try { - Field field = type.getDeclaredField(name); - field.setAccessible(true); - return field.get( instance ); - } - catch (NoSuchFieldException exception) { - type = type.getSuperclass(); - if (type == null) { - throw new IllegalStateException("Could not find field " + name, exception); - } - } - catch (Exception exception) { - throw new IllegalStateException("Could not get value " + type.getName() + '.' + name, exception); - } - } - } - } ); - } - static final class EmptyList_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { return new Expression(oldInstance, Collections.class, "emptyList", null); @@ -496,7 +471,7 @@ static final class CheckedCollection_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { - Object type = getPrivateField(oldInstance, "type"); + Object type = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedCollection.type"); List list = new ArrayList((Collection) oldInstance); return new Expression(oldInstance, Collections.class, "checkedCollection", new Object[]{list, type}); } @@ -504,7 +479,7 @@ static final class CheckedList_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { - Object type = getPrivateField(oldInstance, "type"); + Object type = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedCollection.type"); List list = new LinkedList((Collection) oldInstance); return new Expression(oldInstance, Collections.class, "checkedList", new Object[]{list, type}); } @@ -512,7 +487,7 @@ static final class CheckedRandomAccessList_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { - Object type = getPrivateField(oldInstance, "type"); + Object type = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedCollection.type"); List list = new ArrayList((Collection) oldInstance); return new Expression(oldInstance, Collections.class, "checkedList", new Object[]{list, type}); } @@ -520,7 +495,7 @@ static final class CheckedSet_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { - Object type = getPrivateField(oldInstance, "type"); + Object type = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedCollection.type"); Set set = new HashSet((Set) oldInstance); return new Expression(oldInstance, Collections.class, "checkedSet", new Object[]{set, type}); } @@ -528,7 +503,7 @@ static final class CheckedSortedSet_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { - Object type = getPrivateField(oldInstance, "type"); + Object type = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedCollection.type"); SortedSet set = new TreeSet((SortedSet) oldInstance); return new Expression(oldInstance, Collections.class, "checkedSortedSet", new Object[]{set, type}); } @@ -536,8 +511,8 @@ static final class CheckedMap_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { - Object keyType = getPrivateField(oldInstance, "keyType"); - Object valueType = getPrivateField(oldInstance, "valueType"); + Object keyType = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedMap.keyType"); + Object valueType = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedMap.valueType"); Map map = new HashMap((Map) oldInstance); return new Expression(oldInstance, Collections.class, "checkedMap", new Object[]{map, keyType, valueType}); } @@ -545,8 +520,8 @@ static final class CheckedSortedMap_PersistenceDelegate extends java_util_Collections { protected Expression instantiate(Object oldInstance, Encoder out) { - Object keyType = getPrivateField(oldInstance, "keyType"); - Object valueType = getPrivateField(oldInstance, "valueType"); + Object keyType = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedMap.keyType"); + Object valueType = MetaData.getPrivateFieldValue(oldInstance, "java.util.Collections$CheckedMap.valueType"); SortedMap map = new TreeMap((SortedMap) oldInstance); return new Expression(oldInstance, Collections.class, "checkedSortedMap", new Object[]{map, keyType, valueType}); } @@ -568,7 +543,7 @@ } private static Object getType(Object instance) { - return java_util_Collections.getPrivateField(instance, "keyType"); + return MetaData.getPrivateFieldValue(instance, "java.util.EnumMap.keyType"); } } @@ -587,7 +562,7 @@ } private static Object getType(Object instance) { - return java_util_Collections.getPrivateField(instance, "elementType"); + return MetaData.getPrivateFieldValue(instance, "java.util.EnumSet.elementType"); } } @@ -1268,7 +1243,7 @@ private Integer getAxis(Object object) { Box box = (Box) object; - return (Integer) java_util_Collections.getPrivateField(box.getLayout(), "axis"); + return (Integer) MetaData.getPrivateFieldValue(box.getLayout(), "javax.swing.BoxLayout.axis"); } } @@ -1351,6 +1326,7 @@ } class MetaData { + private static final Map<String,Field> fields = Collections.synchronizedMap(new WeakHashMap<String, Field>()); private static Hashtable internalPersistenceDelegates = new Hashtable(); private static Hashtable transientProperties = new Hashtable(); @@ -1706,4 +1682,35 @@ } tp.add(property); } + + static Object getPrivateFieldValue(Object instance, String name) { + Field field = fields.get(name); + if (field == null) { + int index = name.lastIndexOf('.'); + final String className = name.substring(0, index); + final String fieldName = name.substring(1 + index); + field = AccessController.doPrivileged(new PrivilegedAction<Field>() { + public Field run() { + try { + Field field = Class.forName(className).getDeclaredField(fieldName); + field.setAccessible(true); + return field; + } + catch (ClassNotFoundException exception) { + throw new IllegalStateException("Could not find class", exception); + } + catch (NoSuchFieldException exception) { + throw new IllegalStateException("Could not find field", exception); + } + } + }); + fields.put(name, field); + } + try { + return field.get(instance); + } + catch (IllegalAccessException exception) { + throw new IllegalStateException("Could not get value of the field", exception); + } + } } Modified: classlib6/core/src/openjdk/java/java/beans/Statement.java =================================================================== --- classlib6/core/src/openjdk/java/java/beans/Statement.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/beans/Statement.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -29,6 +29,10 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; import com.sun.beans.finder.ClassFinder; import sun.reflect.misc.MethodUtil; @@ -61,9 +65,10 @@ } }; - Object target; - String methodName; - Object[] arguments; + private final AccessControlContext acc = AccessController.getContext(); + private final Object target; + private final String methodName; + private final Object[] arguments; /** * Creates a new <code>Statement</code> object with a <code>target</code>, @@ -141,6 +146,27 @@ } Object invoke() throws Exception { + AccessControlContext acc = this.acc; + if ((acc == null) && (System.getSecurityManager() != null)) { + throw new SecurityException("AccessControlContext is not set"); + } + try { + return AccessController.doPrivileged( + new PrivilegedExceptionAction<Object>() { + public Object run() + throws Exception { + return invokeInternal(); + } + }, + acc + ); + } + catch (PrivilegedActionException exception) { + throw exception.getException(); + } + } + + private Object invokeInternal() throws Exception { Object target = getTarget(); String methodName = getMethodName(); Modified: classlib6/core/src/openjdk/java/java/math/BigDecimal.java =================================================================== --- classlib6/core/src/openjdk/java/java/math/BigDecimal.java 2011-03-05 11:01:11 UTC (rev 5796) +++ classlib6/core/src/openjdk/java/java/math/BigDecimal.java 2011-03-05 11:09:31 UTC (rev 5797) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, 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 @@ -29,6 +29,9 @@ package java.math; +import java.util.Arrays; +import static java.math.BigInteger.LONG_MASK; + /** * Immutable, arbitrary-precision signed decimal numbers. A * {@code BigDecimal} consists of an arbitrary precision integer @@ -229,7 +232,7 @@ * @serial * @see #scale */ - private int scale = 0; // Note: this may have any value, so + private int scale; // Note: this may have any value, so // calculations must be done in longs /** * The number of decimal digits in this BigDecimal, or 0 if the @@ -240,25 +243,25 @@ * * @since 1.5 */ - private volatile transient int precision = 0; + private transient int precision; /** * Used to store the canonical string representation, if computed. */ - private volatile transient String stringCache = null; + private transient String stringCache; /** * Sentinel value for {@link #intCompact} indicating the * significand information is only available from {@code intVal}. */ - private static final long INFLATED = Long.MIN_VALUE; + static final long INFLATED = Long.MIN_VALUE; /** * If the absolute value of the significand of this BigDecimal is * less than or equal to {@code Long.MAX_VALUE}, the value can be * compactly stored in this field and used in computations. */ - private transient long intCompact = INFLATED; + private transient long intCompact; // All 18-digit base ten strings fit into a long; not all 19-digit // strings will @@ -269,21 +272,53 @@ /* Appease the serialization gods */ private static final long serialVersionUID = 6108874887143696463L; + private static final ThreadLocal<StringBuilderHelper> + threadLocalStringBuilderHelper = new ThreadLocal<StringBuilderHelper>() { + @Override + protected StringBuilderHelper initialValue() { + return new StringBuilderHelper(); + } + }; + // Cache of common small BigDecimal values. private static final BigDecimal zeroThroughTen[] = { - new BigDecimal(BigInteger.ZERO, 0, 0), - new BigDecimal(BigInteger.ONE, 1, 0), - new BigDecimal(BigInteger.valueOf(2), 2, 0), - new BigDecimal(BigInteger.valueOf(3), 3, 0), - new BigDecimal(BigInteger.valueOf(4), 4, 0), - new BigDecimal(BigInteger.valueOf(5), 5, 0), - new BigDecimal(BigInteger.valueOf(6), 6, 0), - new BigDecimal(BigInteger.valueOf(7), 7, 0), - new BigDecimal(BigInteger.valueOf(8), 8, 0), - new BigDecimal(BigInteger.valueOf(9), 9, 0), - new BigDecimal(BigInteger.TEN, 10, 0), + new BigDecimal(BigInteger.ZERO, 0, 0, 1), + new BigDecimal(BigInteger.ONE, 1, 0, 1), + new BigDecimal(BigInteger.valueOf(2), 2, 0, 1), + new BigDecimal(BigInteger.valueOf(3), 3, 0, 1), + new BigDecimal(BigInteger.valueOf(4), 4, 0, 1), + new BigDecimal(BigInteger.valueOf(5), 5, 0, 1), + new BigDecimal(BigInteger.valueOf(6), 6, 0, 1), + new BigDecimal(BigInteger.valueOf(7), 7, 0, 1), + new BigDecimal(BigInteger.valueOf(8), 8, 0, 1), + new BigDecimal(BigInteger.valueOf(9), 9, 0, 1), + new BigDecimal(BigInteger.TEN, 10, 0, 2), }; + // Cache of zero scaled by 0 - 15 + private static final BigDecimal[] ZERO_SCALED_BY = { + zeroThroughTen[0], + new BigDecimal(BigInteger.ZERO, 0, 1, 1), + new BigDecimal(BigInteger.ZERO, 0, 2, 1), + new BigDecimal(BigInteger.ZERO, 0, 3, 1), + new BigDecimal(BigInteger.ZERO, 0, 4, 1), + new BigDecimal(BigInteger.ZERO, 0, 5, 1), + new BigDecimal(BigInteger.ZERO, 0, 6, 1), + new BigDecimal(BigInteger.ZERO, 0, 7, 1), + new BigDecimal(BigInteger.ZERO, 0, 8, 1), + new BigDecimal(BigInteger.ZERO, 0, 9, 1), + new BigDecimal(BigInteger.ZERO, 0, 10, 1), + new BigDecimal(BigInteger.ZERO, 0, 11, 1), + new BigDecimal(BigInteger.ZERO, 0, 12, 1), + new BigDecimal(BigInteger.ZERO, 0, 13, 1), + new BigDecimal(BigInteger.ZERO, 0, 14, 1), + new BigDecimal(BigInteger.ZERO, 0, 15, 1), + }; + + // Half of Long.MIN_VALUE & Long.MAX_VALUE. + private static final long HALF_LONG_MAX_VALUE = Long.MAX_VALUE / 2; + private static final long HALF_LONG_MIN_VALUE = Long.MIN_VALUE / 2; + // Constants /** * The value 0, with a scale of 0. @@ -312,6 +347,18 @@ // Constructors /** + * Trusted package private constructor. + * Trusted simply means if val is INFLATED, intVal could not be null and + * if intVal is null, val could not be INFLATED. + */ + BigDecimal(BigInteger intVal, long val, int scale, int prec) { + this.scale = scale; + this.precision = prec; + this.intCompact = val; + this.intVal = intVal; + } + + /** * Translates a character array representation of a * {@code BigDecimal} into a {@code BigDecimal}, accepting the * same sequence of characters as the {@link #BigDecimal(String)} @@ -331,11 +378,20 @@ * @since 1.5 */ public BigDecimal(char[] in, int offset, int len) { + // protect against huge length. + if (offset+len > in.length || offset < 0) + throw new NumberFormatException(); // This is the primary string to BigDecimal constructor; all // incoming strings end up here; it uses explicit (inline) // parsing for speed and generates at most one intermediate - // (temporary) object (a char[] array). + // (temporary) object (a char[] array) for non-compact case. + // Use locals for all fields values until completion + int prec = 0; // record precision value + int scl = 0; // record scale value + long rs = 0; // the compact value in long + BigInteger rb = null; // the inflated value in BigInteger + // use array bounds checking to handle too-long, len == 0, // bad offset, etc. try { @@ -351,27 +407,62 @@ } // should now be at numeric part of the significand - int dotoff = -1; // '.' offset, -1 if none + boolean dot = false; // true when there is a '.' int cfirst = offset; // record start of integer long exp = 0; // exponent - if (len > in.length) // protect against huge length - throw new NumberFormatException(); - char coeff[] = new char[len]; // integer significand array - char c; // work + char c; // current character + boolean isCompact = (len <= MAX_COMPACT_DIGITS); + // integer significand array & idx is the index to it. The array + // is ONLY used when we can't use a compact representation. + char coeff[] = isCompact ? null : new char[len]; + int idx = 0; + for (; len > 0; offset++, len--) { c = in[offset]; + // have digit if ((c >= '0' && c <= '9') || Character.isDigit(c)) { - // have digit - coeff[precision] = c; - precision++; // count of digits + // First compact case, we need not to preserve the character + // and we can just compute the value in place. + if (isCompact) { + int digit = Character.digit(c, 10); + if (digit == 0) { + if (prec == 0) + prec = 1; + else if (rs != 0) { + rs *= 10; + ++prec; + } // else digit is a redundant leading zero + } else { + if (prec != 1 || rs != 0) + ++prec; // prec unchanged if preceded by 0s + rs = rs * 10 + digit; + } + } else { // the unscaled value is likely a BigInteger object. + if (c == '0' || Character.digit(c, 10) == 0) { + if (prec == 0) { + coeff[idx] = c; + prec = 1; + } else if (idx != 0) { + coeff[idx++] = c; + ++prec; + } // else c must be a redundant leading zero + } else { + if (prec != 1 || idx != 0) + ++prec; // prec unchanged if preceded by 0s + coeff[idx++] = c; + } + } + if (dot) + ++scl; continue; } + // have dot if (c == '.') { // have dot - if (dotoff >= 0) // two dots + if (dot) // two dots throw new NumberFormatException(); -... [truncated message content] |
From: <ls...@us...> - 2011-03-05 11:01:21
|
Revision: 5796 http://jnode.svn.sourceforge.net/jnode/?rev=5796&view=rev Author: lsantha Date: 2011-03-05 11:01:11 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventRequestManagerImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventSetImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/FieldImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/FloatTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/FloatValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/GenericAttachingConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/GenericListeningConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/IntegerTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/IntegerValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/InterfaceTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/InternalEventHandler.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/JDWPException.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/JNITypeParser.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LineInfo.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LinkedHashMap.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LocalVariableImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LocationImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LockObject.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LongTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LongValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/MethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/MirrorImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/MonitorInfoImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/NonConcreteMethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ObjectReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ObsoleteMethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/Packet.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/PacketStream.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/PrimitiveTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/PrimitiveValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/RawCommandLineLauncher.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ReferenceTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SDE.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ShortTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ShortValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SocketAttachingConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SocketListeningConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SocketTransportService.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/StackFrameImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/StratumLineInfo.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/StringReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SunCommandLineLauncher.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/TargetVM.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadAction.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadGroupReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadListener.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/TypeComponentImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/TypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMAction.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMListener.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMModifiers.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMState.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ValueContainer.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VirtualMachineImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VirtualMachineManagerImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VirtualMachineManagerService.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VoidTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VoidValueImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/Entity.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLEntityReader.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLEventReaderImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLInputFactoryImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/AttributeImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/CharacterEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/CommentEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/DTDEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/DummyEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EndDocumentEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EndElementEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EntityDeclarationImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EntityReferenceEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/NamedEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/NotationDeclarationImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/ProcessingInstructionEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/StartDocumentEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/StartElementEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/UTF8OutputStreamWriter.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLDOMWriterImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLOutputSource.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLWriter.java Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -20,6 +20,8 @@ package com.sun.org.apache.xerces.internal.jaxp.validation; +import java.util.HashMap; + import javax.xml.validation.Schema; import javax.xml.validation.Validator; import javax.xml.validation.ValidatorHandler; @@ -33,6 +35,16 @@ abstract class AbstractXMLSchema extends Schema implements XSGrammarPoolContainer { + /** + * Map containing the initial values of features for + * validators created using this grammar pool container. + */ + private final HashMap fFeatures; + + public AbstractXMLSchema() { + fFeatures = new HashMap(); + } + /* * Schema methods */ @@ -51,4 +63,25 @@ return new ValidatorHandlerImpl(this); } + /* + * XSGrammarPoolContainer methods + */ + + /** + * Returns the initial value of a feature for validators created + * using this grammar pool container or null if the validators + * should use the default value. + */ + public final Boolean getFeature(String featureId) { + return (Boolean) fFeatures.get(featureId); + } + + /* + * Other methods + */ + + final void setFeature(String featureId, boolean state) { + fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE); + } + } // AbstractXMLSchema Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -33,18 +33,11 @@ */ final class EmptyXMLSchema extends AbstractXMLSchema implements XMLGrammarPool { - private static EmptyXMLSchema EMPTY_XML_SCHEMA_INSTANCE = new EmptyXMLSchema(); - /** Zero length grammar array. */ private static final Grammar [] ZERO_LENGTH_GRAMMAR_ARRAY = new Grammar [0]; - /** Returns the one and only instance of this class. */ - public static EmptyXMLSchema getInstance() { - return EMPTY_XML_SCHEMA_INSTANCE; - } + public EmptyXMLSchema() {} - private EmptyXMLSchema() {} - /* * XMLGrammarPool methods */ Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -228,21 +228,26 @@ // Select Schema implementation based on grammar count. final int grammarCount = pool.getGrammarCount(); + AbstractXMLSchema schema = null; if (grammarCount > 1) { - return new XMLSchema(new ReadOnlyGrammarPool(pool)); + schema = new XMLSchema(new ReadOnlyGrammarPool(pool)); } else if (grammarCount == 1) { Grammar[] grammars = pool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA); - return new SimpleXMLSchema(grammars[0]); + schema = new SimpleXMLSchema(grammars[0]); } else { - return EmptyXMLSchema.getInstance(); + schema = new EmptyXMLSchema(); } + propagateFeatures(schema); + return schema; } public Schema newSchema() throws SAXException { // Use a Schema that uses the system id as the equality source. - return new WeakReferenceXMLSchema(); + AbstractXMLSchema schema = new WeakReferenceXMLSchema(); + propagateFeatures(schema); + return schema; } public boolean getFeature(String name) @@ -372,6 +377,15 @@ } } + private void propagateFeatures(AbstractXMLSchema schema) { + schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, fSecurityManager != null); + String[] features = fXMLSchemaLoader.getRecognizedFeatures(); + for (int i = 0; i < features.length; ++i) { + boolean state = fXMLSchemaLoader.getFeature(features[i]); + schema.setFeature(features[i], state); + } + } + /** * Extension of XMLGrammarPoolImpl which exposes the number of * grammars stored in the grammar pool. Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -22,6 +22,8 @@ import java.util.HashMap; import java.util.Locale; +import java.util.Iterator; +import java.util.Map; import javax.xml.XMLConstants; @@ -161,6 +163,19 @@ private ValidationManager fValidationManager; // + // Configuration + // + + /** Stores initial feature values for validator reset. */ + private final HashMap fInitFeatures = new HashMap(); + + /** Stores initial property values for validator reset. */ + private final HashMap fInitProperties = new HashMap(); + + /** Stores the initial security manager. */ + private final SecurityManager fInitSecurityManager; + + // // User Objects // @@ -211,9 +226,20 @@ fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter()); // add all recognized features and properties and apply their defaults - addRecognizedParamsAndSetDefaults(fEntityManager); - addRecognizedParamsAndSetDefaults(fErrorReporter); - addRecognizedParamsAndSetDefaults(fSchemaValidator); + addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer); + addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer); + addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer); + + // if the secure processing feature is set to true, add a security manager to the configuration + Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); + if (Boolean.TRUE.equals(secureProcessing)) { + fInitSecurityManager = new SecurityManager(); + } + else { + fInitSecurityManager = null; + } + fComponents.put(SECURITY_MANAGER, fInitSecurityManager); + } /** @@ -266,7 +292,6 @@ else if (USE_GRAMMAR_POOL_ONLY.equals(featureId) && value != fUseGrammarPoolOnly) { throw new XMLConfigurationException(XMLConfigurationException.NOT_SUPPORTED, featureId); } - fConfigUpdated = true; if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) { if (_isSecureMode && !value) { throw new XMLConfigurationException(XMLConfigurationException.NOT_ALLOWED, XMLConstants.FEATURE_SECURE_PROCESSING); @@ -274,9 +299,14 @@ setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); return; } + fConfigUpdated = true; fEntityManager.setFeature(featureId, value); fErrorReporter.setFeature(featureId, value); fSchemaValidator.setFeature(featureId, value); + if (!fInitFeatures.containsKey(featureId)) { + boolean current = super.getFeature(featureId); + fInitFeatures.put(featureId, current ? Boolean.TRUE : Boolean.FALSE); + } super.setFeature(featureId, value); } @@ -336,6 +366,9 @@ fComponents.put(propertyId, value); return; } + if (!fInitProperties.containsKey(propertyId)) { + fInitProperties.put(propertyId, super.getProperty(propertyId)); + } super.setProperty(propertyId, value); } @@ -348,7 +381,7 @@ * @param component The component whose recognized features * and properties will be added to the configuration */ - public void addRecognizedParamsAndSetDefaults(XMLComponent component) { + public void addRecognizedParamsAndSetDefaults(XMLComponent component, XSGrammarPoolContainer grammarContainer) { // register component's recognized features final String[] recognizedFeatures = component.getRecognizedFeatures(); @@ -359,7 +392,7 @@ addRecognizedProperties(recognizedProperties); // set default values - setFeatureDefaults(component, recognizedFeatures); + setFeatureDefaults(component, recognizedFeatures, grammarContainer); setPropertyDefaults(component, recognizedProperties); } @@ -406,10 +439,6 @@ void restoreInitialState() { fConfigUpdated = true; - // Clear feature and property tables. - fFeatures.clear(); - fProperties.clear(); - // Remove error resolver and error handler fComponents.put(ENTITY_RESOLVER, null); fComponents.put(ERROR_HANDLER, null); @@ -418,21 +447,46 @@ setLocale(null); fComponents.put(LOCALE, null); - // Restore component defaults. - setFeatureDefaults(fEntityManager, fEntityManager.getRecognizedFeatures()); - setPropertyDefaults(fEntityManager, fEntityManager.getRecognizedProperties()); - setFeatureDefaults(fErrorReporter, fErrorReporter.getRecognizedFeatures()); - setPropertyDefaults(fErrorReporter, fErrorReporter.getRecognizedProperties()); - setFeatureDefaults(fSchemaValidator, fSchemaValidator.getRecognizedFeatures()); - setPropertyDefaults(fSchemaValidator, fSchemaValidator.getRecognizedProperties()); + // Restore initial security manager + fComponents.put(SECURITY_MANAGER, fInitSecurityManager); + + // Set the Locale back to null. + setLocale(null); + fComponents.put(LOCALE, null); + + // Reset feature and property values to their initial values + if (!fInitFeatures.isEmpty()) { + Iterator iter = fInitFeatures.entrySet().iterator(); + while (iter.hasNext()) { + Map.Entry entry = (Map.Entry) iter.next(); + String name = (String) entry.getKey(); + boolean value = ((Boolean) entry.getValue()).booleanValue(); + super.setFeature(name, value); + } + fInitFeatures.clear(); + } + if (!fInitProperties.isEmpty()) { + Iterator iter = fInitProperties.entrySet().iterator(); + while (iter.hasNext()) { + Map.Entry entry = (Map.Entry) iter.next(); + String name = (String) entry.getKey(); + Object value = entry.getValue(); + super.setProperty(name, value); + } + fInitProperties.clear(); + } } /** Sets feature defaults for the given component on this configuration. */ - private void setFeatureDefaults(final XMLComponent component, final String [] recognizedFeatures) { + private void setFeatureDefaults(final XMLComponent component, + final String [] recognizedFeatures, XSGrammarPoolContainer grammarContainer) { if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; - Boolean state = component.getFeatureDefault(featureId); + Boolean state = grammarContainer.getFeature(featureId); + if (state == null) { + state = component.getFeatureDefault(featureId); + } if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -48,4 +48,11 @@ */ public boolean isFullyComposed(); + /** + * Returns the initial value of a feature for validators created + * using this grammar pool container or null if the validators + * should use the default value. + */ + public Boolean getFeature(String featureId); + } Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -247,6 +247,8 @@ if (!_alreadyInitialized) { _transformHash = new HashMap(10); + // make sure builtin algorithms are all registered first + com.sun.org.apache.xml.internal.security.Init.init(); _alreadyInitialized = true; } } @@ -274,19 +276,13 @@ "algorithm.alreadyRegistered", exArgs); } - ClassLoader cl = (ClassLoader) AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - return Thread.currentThread().getContextClassLoader(); - } - }); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Transform._transformHash.put (algorithmURI, Class.forName(implementingClass, true, cl)); } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + throw new RuntimeException(e); } } } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 2008, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; @@ -119,7 +119,7 @@ String[] tokenArray = new String[tokenList.size()]; for (int i = 0; i < tokenList.size(); i++) { - tokenArray[i] = (String)tokenList.get(i); + tokenArray[i] = tokenList.get(i); } return tokenArray; } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2001, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2001, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 2000, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2008, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; @@ -95,11 +95,8 @@ } public List<ClassType> subclasses() { - List<ReferenceType> all = vm.allClasses(); List<ClassType> subs = new ArrayList<ClassType>(); - Iterator iter = all.iterator(); - while (iter.hasNext()) { - ReferenceType refType = (ReferenceType)iter.next(); + for (ReferenceType refType : vm.allClasses()) { if (refType instanceof ClassType) { ClassType clazz = (ClassType)refType; ClassType superclass = clazz.superclass(); @@ -223,7 +220,7 @@ List<? extends Value> arguments = method.validateAndPrepareArgumentsForInvoke(origArguments); - ValueImpl[] args = (ValueImpl[])arguments.toArray(new ValueImpl[0]); + ValueImpl[] args = arguments.toArray(new ValueImpl[0]); JDWP.ClassType.InvokeMethod ret; try { PacketStream stream = @@ -271,7 +268,7 @@ List<Value> arguments = method.validateAndPrepareArgumentsForInvoke( origArguments); - ValueImpl[] args = (ValueImpl[])arguments.toArray(new ValueImpl[0]); + ValueImpl[] args = arguments.toArray(new ValueImpl[0]); JDWP.ClassType.NewInstance ret = null; try { PacketStream stream = @@ -301,11 +298,8 @@ } public Method concreteMethodByName(String name, String signature) { - List methods = visibleMethods(); Method method = null; - Iterator iter = methods.iterator(); - while (iter.hasNext()) { - Method candidate = (Method)iter.next(); + for (Method candidate : visibleMethods()) { if (candidate.name().equals(name) && candidate.signature().equals(signature) && !candidate.isAbstract()) { @@ -330,9 +324,7 @@ * Avoid duplicate checking on each method by iterating through * duplicate-free allInterfaces() rather than recursing */ - Iterator iter = allInterfaces().iterator(); - while (iter.hasNext()) { - InterfaceType interfaze = (InterfaceType)iter.next(); + for (InterfaceType interfaze : allInterfaces()) { list.addAll(interfaze.methods()); } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2008, 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 @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package com.sun.tools.jdi; import com.sun.jdi.*; @@ -246,7 +247,7 @@ public byte[] bytecodes() { byte[] bytecodes = (bytecodesRef == null) ? null : - (byte[])bytecodesRef.get(); + bytecodesRef.get(); if (bytecodes == null) { try { bytecodes = JDWP.Method.Bytecodes. @@ -261,7 +262,7 @@ * to return the cached bytecodes directly; instead, we * make a clone at the cost of using more memory. */ - return (byte[])bytecodes.clone(); + return bytecodes.clone(); } int argSlotCount() throws AbsentInformationException { @@ -278,7 +279,7 @@ String stratumID = stratum.id(); SoftLocationXRefs info = (softOtherLocationXRefsRef == null) ? null : - (SoftLocationXRefs)softOtherLocationXRefsRef.get(); + softOtherLocationXRefsRef.get(); if (info != null && info.stratumID.equals(stratumID)) { return info; } @@ -347,7 +348,7 @@ private SoftLocationXRefs getBaseLocations() { SoftLocationXRefs info = (softBaseLocationXRefsRef == null) ? null : - (SoftLocationXRefs)softBaseLocationXRefsRef.get(); + softBaseLocationXRefsRef.get(); if (info != null) { return info; } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2003, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * 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.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * 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 @@ -18,9 +18,9 @@ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. ... [truncated message content] |