/hg/release/icedtea7-forest-2.3/jdk: 29 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Sat Feb 2 11:15:21 PST 2013
changeset c1fa21042291 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=c1fa21042291
author: mullan
date: Fri Oct 26 14:22:21 2012 -0400
7201068: Better handling of UI elements
Reviewed-by: xuelei
changeset 6e173569e1e7 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=6e173569e1e7
author: dmocek
date: Mon Nov 19 13:52:08 2012 -0800
6563318: RMI data sanitization
Reviewed-by: ahgross, hawtin, mchung, smarks
changeset bb956f1f9764 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=bb956f1f9764
author: coffeys
date: Wed Jun 13 17:04:15 2012 +0100
7175616: Port fix for TimeZone from JDK 8 to JDK 7
Reviewed-by: okutsu
changeset ce105dd2e4de in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ce105dd2e4de
author: mchung
date: Mon Nov 26 13:32:17 2012 -0800
6664509: Add logging context
6664528: Find log level matching its name or value given at construction time
Reviewed-by: alanb, ahgross, jgish, hawtin
changeset 87d135824bdf in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=87d135824bdf
author: dholmes
date: Wed Aug 22 21:40:19 2012 -0400
6776941: Improve thread pool shutdown
Reviewed-by: dl, skoivu
changeset ffa0202371bf in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ffa0202371bf
author: anthony
date: Fri Sep 28 18:09:28 2012 +0400
7173145: Improve in-memory representation of splashscreens
Reviewed-by: bae, mschoene
changeset a5cc93f64ee1 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=a5cc93f64ee1
author: ksrini
date: Tue Oct 02 07:05:27 2012 -0700
7186945: Unpack200 improvement
Reviewed-by: jrose, jjh, mschoene
changeset b8fa52891afa in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=b8fa52891afa
author: ksrini
date: Tue Oct 02 07:50:25 2012 -0700
7186946: Refine unpacker resource usage
Reviewed-by: jrose, jjh, mschoene
changeset 339678d41db1 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=339678d41db1
author: rupashka
date: Tue Oct 16 14:55:17 2012 +0400
7186948: Improve Swing data validation
Reviewed-by: art, ahgross
changeset e46d557465da in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=e46d557465da
author: denis
date: Tue Oct 30 22:18:42 2012 +0400
7186952: Improve clipboard access
Reviewed-by: serb, ahgross
changeset f5b89b9c7ebd in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=f5b89b9c7ebd
author: khazra
date: Thu Oct 18 12:13:15 2012 -0700
7186954: Improve connection performance
Reviewed-by: chegar, skoivu
changeset e0280c9bb411 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=e0280c9bb411
author: ksrini
date: Tue Oct 02 07:34:37 2012 -0700
7186957: Improve Pack200 data validation
Reviewed-by: jrose, jjh, mschoene
changeset 496bced2d275 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=496bced2d275
author: xuelei
date: Mon Oct 22 07:31:21 2012 -0700
7192392: Better validation of client keys
Summary: Also reviewed by Andrew Gross<Andrew.Gross at Oracle.COM>
Reviewed-by: vinnie
changeset 5c1e8b779c65 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=5c1e8b779c65
author: xuelei
date: Mon Sep 24 02:06:15 2012 -0700
7192393: Better Checking of order of TLS Messages
Summary: Also reviewed by Andrew Gross<Andrew.Gross at Oracle.COM>
Reviewed-by: weijun
changeset 6527ae06da69 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=6527ae06da69
author: bagiras
date: Tue Nov 13 23:33:57 2012 +0400
7192977: Issue in toolkit thread
Reviewed-by: skoivu, rupashka, art
changeset c9534e095b37 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=c9534e095b37
author: mchung
date: Fri Nov 02 15:16:27 2012 -0700
7197546: (proxy) Reflect about creating reflective proxies
Reviewed-by: alanb, jdn, jrose
changeset d1d5d5456b02 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=d1d5d5456b02
author: rupashka
date: Tue Nov 06 17:49:01 2012 +0400
7200491: Tighten up JTable layout code
Reviewed-by: art, skoivu
changeset ce04db4aba39 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ce04db4aba39
author: malenkov
date: Mon Oct 15 14:06:54 2012 +0400
7200493: Improve cache handling
Reviewed-by: art, ahgross
changeset 06e2577f0750 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=06e2577f0750
author: andrew
date: Sat Feb 02 13:30:13 2013 +0000
7200499: Better data validation for options
Reviewed-by: darcy, jjh, mschoene
changeset 7b89c3dbc9d6 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=7b89c3dbc9d6
author: ksrini
date: Tue Oct 16 10:56:25 2012 -0700
7200500: Launcher better input validation
Reviewed-by: darcy, jjh, mschoene
changeset bcfe6eb51765 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=bcfe6eb51765
author: denis
date: Fri Nov 23 16:27:32 2012 +0400
7201064: Better dialogue checking
Reviewed-by: serb, skoivu
changeset b4bfcea7658f in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=b4bfcea7658f
author: smarks
date: Thu Nov 08 15:21:44 2012 -0800
7201070: Serialization to conform to protocol
Reviewed-by: dmocek, ahgross, skoivu
changeset ab011765c4e8 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ab011765c4e8
author: chegar
date: Wed Nov 07 14:03:57 2012 +0000
7201071: InetSocketAddress serialization issue
Reviewed-by: alanb, michaelm, skoivu
changeset ecf0587c6c88 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ecf0587c6c88
author: weijun
date: Wed Sep 19 12:58:43 2012 +0800
8000210: Improve JarFile code quality
Reviewed-by: ahgross, xuelei, mschoene
changeset 6e0d9f4942af in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=6e0d9f4942af
author: dsamersoff
date: Thu Nov 15 09:41:36 2012 +0100
8000537: Contextualize RequiredModelMBean class
Reviewed-by: ahgross, dsamersoff, skoivu
Contributed-by: Jaroslav Bachorik <jaroslav.bachorik at oracle.com>
changeset b09c28ff798f in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=b09c28ff798f
author: dsamersoff
date: Tue Oct 30 17:18:43 2012 +0400
8000539: Introspect JMX data handling
Summary: Added extra packageAccess check call
Reviewed-by: ahgross, dfuchs
Contributed-by: jaroslav.bachorik at oracle.com
changeset 1cbd6d88554c in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=1cbd6d88554c
author: dmocek
date: Mon Nov 19 15:32:59 2012 -0800
8001242: Improve RMI HTTP conformance
Reviewed-by: ahgross, mchung, smarks
changeset d89bd26ac435 in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=d89bd26ac435
author: bae
date: Thu Nov 15 19:16:41 2012 +0400
8001972: Improve image processing
Reviewed-by: prr, ahgross
changeset 50e268c1fb1f in /hg/release/icedtea7-forest-2.3/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=50e268c1fb1f
author: bae
date: Sat Nov 17 18:21:24 2012 +0400
8002325: Improve management of images
Reviewed-by: prr, ahgross
diffstat:
make/java/java/FILES_java.gmk | 3 +-
src/share/bin/jli_util.h | 2 +-
src/share/bin/parse_manifest.c | 15 +-
src/share/classes/com/sun/beans/finder/MethodFinder.java | 7 +-
src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java | 5 +
src/share/classes/com/sun/java/util/jar/pack/BandStructure.java | 3 +-
src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java | 2 +
src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java | 6 +-
src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java | 4 +-
src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java | 6 +-
src/share/classes/com/sun/jmx/mbeanserver/Introspector.java | 8 +-
src/share/classes/java/awt/Dialog.java | 53 +-
src/share/classes/java/awt/EventQueue.java | 19 +-
src/share/classes/java/awt/TextComponent.java | 25 +-
src/share/classes/java/awt/Window.java | 2 +-
src/share/classes/java/io/ObjectInputStream.java | 6 +
src/share/classes/java/lang/Class.java | 47 +-
src/share/classes/java/lang/invoke/MethodHandleProxies.java | 73 +-
src/share/classes/java/lang/reflect/Proxy.java | 151 ++-
src/share/classes/java/net/InetSocketAddress.java | 272 +++-
src/share/classes/java/util/TimeZone.java | 59 +-
src/share/classes/java/util/concurrent/ThreadPoolExecutor.java | 172 +-
src/share/classes/java/util/jar/JarFile.java | 21 +-
src/share/classes/java/util/logging/Level.java | 255 ++++-
src/share/classes/java/util/logging/LogManager.java | 535 ++++++---
src/share/classes/java/util/logging/Logger.java | 67 +-
src/share/classes/java/util/logging/Logging.java | 14 +-
src/share/classes/java/util/logging/LoggingProxyImpl.java | 11 +-
src/share/classes/java/util/logging/SimpleFormatter.java | 2 +-
src/share/classes/javax/management/modelmbean/RequiredModelMBean.java | 227 +++-
src/share/classes/javax/swing/JTable.java | 14 +-
src/share/classes/javax/swing/RepaintManager.java | 156 +-
src/share/classes/javax/swing/UIDefaults.java | 2 +
src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java | 7 +-
src/share/classes/sun/applet/AppletPanel.java | 60 +-
src/share/classes/sun/awt/AWTAccessor.java | 7 +
src/share/classes/sun/awt/AppContext.java | 62 +-
src/share/classes/sun/awt/image/ByteComponentRaster.java | 70 +-
src/share/classes/sun/awt/image/ByteInterleavedRaster.java | 29 +-
src/share/classes/sun/awt/image/ShortComponentRaster.java | 69 +-
src/share/classes/sun/awt/image/ShortInterleavedRaster.java | 29 +-
src/share/classes/sun/misc/JavaAWTAccess.java | 42 +
src/share/classes/sun/misc/SharedSecrets.java | 13 +-
src/share/classes/sun/net/httpserver/ChunkedInputStream.java | 14 +-
src/share/classes/sun/net/www/http/ChunkedInputStream.java | 9 +
src/share/classes/sun/nio/ch/DatagramChannelImpl.java | 18 +-
src/share/classes/sun/reflect/misc/ReflectUtil.java | 59 +
src/share/classes/sun/rmi/transport/proxy/CGIHandler.java | 19 +-
src/share/classes/sun/rmi/transport/proxy/HttpInputStream.java | 15 +-
src/share/classes/sun/security/pkcs11/P11KeyAgreement.java | 9 +
src/share/classes/sun/security/ssl/ClientHandshaker.java | 13 +-
src/share/classes/sun/security/ssl/DHClientKeyExchange.java | 19 +-
src/share/classes/sun/security/ssl/DHCrypt.java | 87 +-
src/share/classes/sun/security/ssl/HandshakeMessage.java | 16 +-
src/share/classes/sun/security/ssl/RSAClientKeyExchange.java | 4 +-
src/share/classes/sun/security/ssl/ServerHandshaker.java | 18 +-
src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java | 4 +-
src/share/classes/sun/security/util/DerIndefLenConverter.java | 4 +
src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java | 2 +-
src/share/classes/sun/security/util/KeyLength.java | 91 -
src/share/classes/sun/security/util/KeyUtil.java | 204 +++
src/share/lib/security/java.security | 22 +-
src/share/lib/security/java.security-macosx | 18 +-
src/share/lib/security/java.security-solaris | 16 +-
src/share/lib/security/java.security-windows | 16 +-
src/share/native/com/sun/java/util/jar/pack/bands.cpp | 4 +
src/share/native/com/sun/java/util/jar/pack/bands.h | 4 +-
src/share/native/com/sun/java/util/jar/pack/jni.cpp | 53 +-
src/share/native/com/sun/java/util/jar/pack/unpack.cpp | 33 +-
src/share/native/sun/awt/image/awt_parseImage.c | 110 +-
src/share/native/sun/awt/image/awt_parseImage.h | 1 +
src/share/native/sun/awt/medialib/safe_alloc.h | 5 +
src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c | 4 +
src/solaris/classes/sun/nio/ch/SctpChannelImpl.java | 14 +-
src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java | 16 +-
src/solaris/native/sun/nio/ch/DatagramChannelImpl.c | 9 +-
src/solaris/native/sun/nio/ch/SctpChannelImpl.c | 27 +-
src/windows/bin/java_md.c | 34 +-
src/windows/classes/sun/awt/windows/WComponentPeer.java | 9 +-
src/windows/classes/sun/awt/windows/WEmbeddedFrame.java | 15 +-
src/windows/native/sun/nio/ch/DatagramChannelImpl.c | 10 +-
src/windows/native/sun/windows/awt_TextComponent.cpp | 22 +-
src/windows/native/sun/windows/awt_TextComponent.h | 3 +-
83 files changed, 2618 insertions(+), 1064 deletions(-)
diffs (truncated from 6437 to 500 lines):
diff -r 96d4f04f2b7c -r 50e268c1fb1f make/java/java/FILES_java.gmk
--- a/make/java/java/FILES_java.gmk Mon Jan 14 22:25:02 2013 +0000
+++ b/make/java/java/FILES_java.gmk Sat Nov 17 18:21:24 2012 +0400
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -476,6 +476,7 @@
sun/misc/MessageUtils.java \
sun/misc/GC.java \
sun/misc/Service.java \
+ sun/misc/JavaAWTAccess.java \
sun/misc/JavaLangAccess.java \
sun/misc/JavaIOAccess.java \
sun/misc/JavaIOFileDescriptorAccess.java \
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/bin/jli_util.h
--- a/src/share/bin/jli_util.h Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/bin/jli_util.h Sat Nov 17 18:21:24 2012 +0400
@@ -55,7 +55,7 @@
#include <io.h>
#define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
#define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
-#define JLI_Snprintf _snprintf
+size_t JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
#else
#include <unistd.h>
#define JLI_StrCaseCmp(p1, p2) strcasecmp((p1), (p2))
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/bin/parse_manifest.c
--- a/src/share/bin/parse_manifest.c Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/bin/parse_manifest.c Sat Nov 17 18:21:24 2012 +0400
@@ -490,9 +490,9 @@
#ifdef O_BINARY
| O_BINARY /* use binary mode on windows */
#endif
- )) == -1)
+ )) == -1) {
return (-1);
-
+ }
info->manifest_version = NULL;
info->main_class = NULL;
info->jre_version = NULL;
@@ -539,12 +539,14 @@
zentry entry;
void *data = NULL;
- fd = open(jarfile, O_RDONLY
+ if ((fd = open(jarfile, O_RDONLY
#ifdef O_BINARY
| O_BINARY /* use binary mode on windows */
#endif
- );
- if (fd != -1 && find_file(fd, &entry, filename) == 0) {
+ )) == -1) {
+ return NULL;
+ }
+ if (find_file(fd, &entry, filename) == 0) {
data = inflate_file(fd, &entry, size);
}
close(fd);
@@ -586,8 +588,9 @@
#ifdef O_BINARY
| O_BINARY /* use binary mode on windows */
#endif
- )) == -1)
+ )) == -1) {
return (-1);
+ }
if (rc = find_file(fd, &entry, manifest_name) != 0) {
close(fd);
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/beans/finder/MethodFinder.java
--- a/src/share/classes/com/sun/beans/finder/MethodFinder.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/beans/finder/MethodFinder.java Sat Nov 17 18:21:24 2012 +0400
@@ -68,11 +68,14 @@
Signature signature = new Signature(type, name, args);
Method method = CACHE.get(signature);
- if (method != null) {
+ boolean cached = method != null;
+ if (cached && isPackageAccessible(method.getDeclaringClass())) {
return method;
}
method = findAccessibleMethod(new MethodFinder(name, args).find(type.getMethods()));
- CACHE.put(signature, method);
+ if (!cached) {
+ CACHE.put(signature, method);
+ }
return method;
}
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java
--- a/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java Sat Nov 17 18:21:24 2012 +0400
@@ -41,6 +41,8 @@
import javax.crypto.SecretKey;
import javax.crypto.spec.*;
+import sun.security.util.KeyUtil;
+
/**
* This class implements the Diffie-Hellman key agreement protocol between
* any number of parties.
@@ -200,6 +202,9 @@
throw new InvalidKeyException("Incompatible parameters");
}
+ // validate the Diffie-Hellman public key
+ KeyUtil.validate(dhPubKey);
+
// store the y value
this.y = dhPubKey.getY();
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/java/util/jar/pack/BandStructure.java
--- a/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java Sat Nov 17 18:21:24 2012 +0400
@@ -1003,7 +1003,6 @@
/** Write a constant pool reference. */
public void putRef(Entry e) {
- assert(index != null);
addValue(encodeRefOrNull(e, index));
}
public void putRef(Entry e, Index index) {
@@ -1055,6 +1054,8 @@
int encodeRef(Entry e, Index ix) {
+ if (ix == null)
+ throw new RuntimeException("null index for " + e.stringValue());
int coding = ix.indexOf(e);
if (verbose > 2)
Utils.log.fine("putRef "+coding+" => "+e);
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java
--- a/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java Sat Nov 17 18:21:24 2012 +0400
@@ -1049,6 +1049,8 @@
/** Index of all CP entries of a given tag and class. */
public Index getMemberIndex(byte tag, ClassEntry classRef) {
+ if (classRef == null)
+ throw new RuntimeException("missing class reference for " + tagName(tag));
if (indexByTagAndClass == null)
indexByTagAndClass = new Index[CONSTANT_Limit][];
Index allClasses = getIndexByTag(CONSTANT_Class);
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java
--- a/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java Sat Nov 17 18:21:24 2012 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -104,6 +104,10 @@
return (p200 == null)? null: p200._nunp;
}
+ private synchronized long getUnpackerPtr() {
+ return unpackerPtr;
+ }
+
// Callback from the unpacker engine to get more data.
private long readInputFn(ByteBuffer pbuf, long minlen) throws IOException {
if (in == null) return 0; // nothing is readable
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java
--- a/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java Sat Nov 17 18:21:24 2012 +0400
@@ -83,7 +83,7 @@
* @param out an OutputStream
* @exception IOException if an error is encountered.
*/
- public void pack(JarFile in, OutputStream out) throws IOException {
+ public synchronized void pack(JarFile in, OutputStream out) throws IOException {
assert(Utils.currentInstance.get() == null);
TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
? null
@@ -118,7 +118,7 @@
* @param out an OutputStream
* @exception IOException if an error is encountered.
*/
- public void pack(JarInputStream in, OutputStream out) throws IOException {
+ public synchronized void pack(JarInputStream in, OutputStream out) throws IOException {
assert(Utils.currentInstance.get() == null);
TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE)) ? null :
TimeZone.getDefault();
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java
--- a/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java Sat Nov 17 18:21:24 2012 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -106,7 +106,7 @@
* @param out a JarOutputStream.
* @exception IOException if an error is encountered.
*/
- public void unpack(InputStream in, JarOutputStream out) throws IOException {
+ public synchronized void unpack(InputStream in, JarOutputStream out) throws IOException {
if (in == null) {
throw new NullPointerException("null input");
}
@@ -151,7 +151,7 @@
* @param out a JarOutputStream.
* @exception IOException if an error is encountered.
*/
- public void unpack(File in, JarOutputStream out) throws IOException {
+ public synchronized void unpack(File in, JarOutputStream out) throws IOException {
if (in == null) {
throw new NullPointerException("null input");
}
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/com/sun/jmx/mbeanserver/Introspector.java
--- a/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java Sat Nov 17 18:21:24 2012 +0400
@@ -56,6 +56,8 @@
import java.lang.reflect.InvocationTargetException;
import javax.management.AttributeNotFoundException;
import javax.management.openmbean.CompositeData;
+import sun.reflect.misc.MethodUtil;
+import sun.reflect.misc.ReflectUtil;
/**
* This class contains the methods for performing all the tests needed to verify
@@ -528,8 +530,10 @@
// to locate method
readMethod = SimpleIntrospector.getReadMethod(clazz, element);
}
- if (readMethod != null)
- return readMethod.invoke(complex);
+ if (readMethod != null) {
+ ReflectUtil.checkPackageAccess(readMethod.getDeclaringClass());
+ return MethodUtil.invoke(readMethod, complex, new Class[0]);
+ }
throw new AttributeNotFoundException(
"Could not find the getter method for the property " +
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/java/awt/Dialog.java
--- a/src/share/classes/java/awt/Dialog.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/java/awt/Dialog.java Sat Nov 17 18:21:24 2012 +0400
@@ -39,6 +39,7 @@
import sun.awt.util.IdentityArrayList;
import sun.awt.util.IdentityLinkedList;
import sun.security.util.SecurityConstants;
+import java.security.AccessControlException;
/**
* A Dialog is a top-level window with a title and a border
@@ -128,6 +129,8 @@
*/
boolean undecorated = false;
+ private transient boolean initialized = false;
+
/**
* Modal dialogs block all input to some top-level windows.
* Whether a particular window is blocked depends on dialog's type
@@ -671,6 +674,7 @@
this.title = title;
setModalityType(modalityType);
SunToolkit.checkAndSetPolicy(this);
+ initialized = true;
}
/**
@@ -722,6 +726,7 @@
this.title = title;
setModalityType(modalityType);
SunToolkit.checkAndSetPolicy(this);
+ initialized = true;
}
/**
@@ -851,12 +856,9 @@
if (modalityType == type) {
return;
}
- if (type == ModalityType.TOOLKIT_MODAL) {
- SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- sm.checkPermission(SecurityConstants.AWT.TOOLKIT_MODALITY_PERMISSION);
- }
- }
+
+ checkModalityPermission(type);
+
modalityType = type;
modal = (modalityType != ModalityType.MODELESS);
}
@@ -1025,6 +1027,9 @@
*/
@Deprecated
public void show() {
+ if (!initialized) throw new IllegalStateException(
+ "The dialog component has not been initialized properly");
+
beforeFirstShow = false;
if (!isModal()) {
conditionalShow(null, null);
@@ -1600,18 +1605,50 @@
}
}
+ private void checkModalityPermission(ModalityType mt) {
+ if (mt == ModalityType.TOOLKIT_MODAL) {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPermission(
+ SecurityConstants.AWT.TOOLKIT_MODALITY_PERMISSION
+ );
+ }
+ }
+ }
+
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException, HeadlessException
{
GraphicsEnvironment.checkHeadless();
- s.defaultReadObject();
+
+ java.io.ObjectInputStream.GetField fields =
+ s.readFields();
+
+ ModalityType localModalityType = (ModalityType)fields.get("modalityType", null);
+
+ try {
+ checkModalityPermission(localModalityType);
+ } catch (AccessControlException ace) {
+ localModalityType = DEFAULT_MODALITY_TYPE;
+ }
// in 1.5 or earlier modalityType was absent, so use "modal" instead
- if (modalityType == null) {
+ if (localModalityType == null) {
+ this.modal = fields.get("modal", false);
setModal(modal);
}
+ this.resizable = fields.get("resizable", true);
+ this.undecorated = fields.get("undecorated", false);
+ this.title = (String)fields.get("title", "");
+ this.modalityType = localModalityType;
+
blockedWindows = new IdentityArrayList();
+
+ SunToolkit.checkAndSetPolicy(this);
+
+ initialized = true;
+
}
/*
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/java/awt/EventQueue.java
--- a/src/share/classes/java/awt/EventQueue.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/java/awt/EventQueue.java Sat Nov 17 18:21:24 2012 +0400
@@ -189,7 +189,8 @@
}
public void removeSourceEvents(EventQueue eventQueue,
Object source,
- boolean removeAllEvents) {
+ boolean removeAllEvents)
+ {
eventQueue.removeSourceEvents(source, removeAllEvents);
}
public boolean noEvents(EventQueue eventQueue) {
@@ -198,6 +199,11 @@
public void wakeup(EventQueue eventQueue, boolean isShutdown) {
eventQueue.wakeup(isShutdown);
}
+ public void invokeAndWait(Object source, Runnable r)
+ throws InterruptedException, InvocationTargetException
+ {
+ EventQueue.invokeAndWait(source, r);
+ }
});
}
@@ -1233,8 +1239,14 @@
* @since 1.2
*/
public static void invokeAndWait(Runnable runnable)
- throws InterruptedException, InvocationTargetException {
+ throws InterruptedException, InvocationTargetException
+ {
+ invokeAndWait(Toolkit.getDefaultToolkit(), runnable);
+ }
+ static void invokeAndWait(Object source, Runnable runnable)
+ throws InterruptedException, InvocationTargetException
+ {
if (EventQueue.isDispatchThread()) {
throw new Error("Cannot call invokeAndWait from the event dispatcher thread");
}
@@ -1243,8 +1255,7 @@
Object lock = new AWTInvocationLock();
InvocationEvent event =
- new InvocationEvent(Toolkit.getDefaultToolkit(), runnable, lock,
- true);
+ new InvocationEvent(source, runnable, lock, true);
synchronized (lock) {
Toolkit.getEventQueue().postEvent(event);
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/java/awt/TextComponent.java
--- a/src/share/classes/java/awt/TextComponent.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/java/awt/TextComponent.java Sat Nov 17 18:21:24 2012 +0400
@@ -107,12 +107,6 @@
// the background color of non-editable TextComponents.
boolean backgroundSetByClientCode = false;
- /**
- * True if this <code>TextComponent</code> has access
- * to the System clipboard.
- */
- transient private boolean canAccessClipboard;
-
transient protected TextListener textListener;
/*
@@ -137,7 +131,6 @@
GraphicsEnvironment.checkHeadless();
this.text = (text != null) ? text : "";
setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
- checkSystemClipboardAccess();
}
private void enableInputMethodsIfNecessary() {
@@ -727,17 +720,14 @@
/**
* Assigns a valid value to the canAccessClipboard instance variable.
*/
- private void checkSystemClipboardAccess() {
- canAccessClipboard = true;
+ private boolean canAccessClipboard() {
SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- try {
- sm.checkSystemClipboardAccess();
- }
- catch (SecurityException e) {
- canAccessClipboard = false;
- }
- }
+ if (sm == null) return true;
+ try {
+ sm.checkSystemClipboardAccess();
+ return true;
+ } catch (SecurityException e) {}
+ return false;
}
/*
@@ -820,7 +810,6 @@
}
}
enableInputMethodsIfNecessary();
- checkSystemClipboardAccess();
}
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/java/awt/Window.java
--- a/src/share/classes/java/awt/Window.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/java/awt/Window.java Sat Nov 17 18:21:24 2012 +0400
@@ -1206,7 +1206,7 @@
}
else {
try {
- EventQueue.invokeAndWait(action);
+ EventQueue.invokeAndWait(this, action);
}
catch (InterruptedException e) {
System.err.println("Disposal was interrupted:");
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/java/io/ObjectInputStream.java
--- a/src/share/classes/java/io/ObjectInputStream.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/java/io/ObjectInputStream.java Sat Nov 17 18:21:24 2012 +0400
@@ -1750,6 +1750,12 @@
ObjectStreamClass desc = readClassDesc(false);
desc.checkDeserialize();
+ Class<?> cl = desc.forClass();
+ if (cl == String.class || cl == Class.class
+ || cl == ObjectStreamClass.class) {
+ throw new InvalidClassException("invalid class descriptor");
+ }
+
Object obj;
try {
obj = desc.isInstantiable() ? desc.newInstance() : null;
diff -r 96d4f04f2b7c -r 50e268c1fb1f src/share/classes/java/lang/Class.java
--- a/src/share/classes/java/lang/Class.java Mon Jan 14 22:25:02 2013 +0000
+++ b/src/share/classes/java/lang/Class.java Sat Nov 17 18:21:24 2012 +0400
@@ -65,7 +65,9 @@
import sun.reflect.generics.scope.ClassScope;
import sun.security.util.SecurityConstants;
More information about the distro-pkg-dev
mailing list