Mercurial > hg > release > icedtea7-2.1
view patches/boot/ecj-multicatch.patch @ 2567:3c893cdacaca
Bring in latest security patches and backports from u25.
2013-06-27 Andrew John Hughes <gnu.andrew@member.fsf.org>
* Makefile.am,
(HOTSPOT_CHANGESET): Update to IcedTea7 2.1.9 tag,
bringing in latest security patches.
(CORBA_CHANGESET): Likewise.
(JAXWS_CHANGESET): Likewise.
(JDK_CHANGESET): Likewise.
(LANGTOOLS_CHANGESET): Likewise.
(HOTSPOT_SHA256SUM): Likewise.
(CORBA_SHA256SUM): Likewise.
(JAXWS_SHA256SUM): Likewise.
(JDK_SHA256SUM): Likewise.
(LANGTOOLS_SHA256SUM): Likewise.
* patches/boot/ecj-diamond.patch,
* patches/boot/ecj-multicatch.patch:
Add new cases.
* patches/boot/ecj-stringswitch.patch:
Update MethodHandleNatives patch, including
adding new case.
* patches/boot/tobin.patch:
Update following move from sun.awt.X11
to sun.awt.
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Fri, 28 Jun 2013 06:29:04 +0100 |
parents | 421a34013779 |
children |
line wrap: on
line source
--- openjdk-boot/jdk/src/share/classes/java/io/PrintStream.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/PrintStream.java @@ -91,7 +91,10 @@ requireNonNull(csn, "charsetName"); try { return Charset.forName(csn); - } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) { + } catch (IllegalCharsetNameException unused) { + // UnsupportedEncodingException should be thrown + throw new UnsupportedEncodingException(csn); + } catch (UnsupportedCharsetException unused) { // UnsupportedEncodingException should be thrown throw new UnsupportedEncodingException(csn); } --- openjdk-boot/jdk/src/share/classes/java/io/PrintWriter.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/PrintWriter.java @@ -85,7 +85,10 @@ Objects.requireNonNull(csn, "charsetName"); try { return Charset.forName(csn); - } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) { + } catch (IllegalCharsetNameException unused) { + // UnsupportedEncodingException should be thrown + throw new UnsupportedEncodingException(csn); + } catch (UnsupportedCharsetException unused) { // UnsupportedEncodingException should be thrown throw new UnsupportedEncodingException(csn); } --- openjdk-boot/jdk/src/share/classes/java/lang/management/ManagementFactory.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/management/ManagementFactory.java @@ -606,7 +606,9 @@ // create an MXBean proxy return JMX.newMXBeanProxy(connection, objName, mxbeanInterface, emitter); - } catch (InstanceNotFoundException|MalformedObjectNameException e) { + } catch (InstanceNotFoundException e) { + throw new IllegalArgumentException(e); + } catch (MalformedObjectNameException e) { throw new IllegalArgumentException(e); } } --- openjdk-boot/jdk/src/share/classes/java/util/Formatter.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Formatter.java @@ -1857,7 +1857,10 @@ Objects.requireNonNull(csn, "charsetName"); try { return Charset.forName(csn); - } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) { + } catch (IllegalCharsetNameException unused) { + // UnsupportedEncodingException should be thrown + throw new UnsupportedEncodingException(csn); + } catch (UnsupportedCharsetException unused) { // UnsupportedEncodingException should be thrown throw new UnsupportedEncodingException(csn); } --- openjdk-boot/jdk/src/share/classes/java/util/Scanner.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Scanner.java @@ -633,7 +633,10 @@ Objects.requireNonNull(csn, "charsetName"); try { return Charset.forName(csn); - } catch (IllegalCharsetNameException|UnsupportedCharsetException e) { + } catch (IllegalCharsetNameException e) { + // IllegalArgumentException should be thrown + throw new IllegalArgumentException(e); + } catch (UnsupportedCharsetException e) { // IllegalArgumentException should be thrown throw new IllegalArgumentException(e); } @@ -684,7 +687,9 @@ Objects.requireNonNull(charsetName, "charsetName"); try { return Charset.forName(charsetName).newDecoder(); - } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) { + } catch (IllegalCharsetNameException unused) { + throw new IllegalArgumentException(charsetName); + } catch (UnsupportedCharsetException unused) { throw new IllegalArgumentException(charsetName); } } --- openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java @@ -676,7 +676,11 @@ IGNORE = IMPL_LOOKUP.findStatic(THIS_CLASS, "ignore", ignoreType); EMPTY = IMPL_LOOKUP.findStatic(THIS_CLASS, "empty", ignoreType.dropParameterTypes(0, 1)); NEW_ARRAY = IMPL_LOOKUP.findStatic(THIS_CLASS, "newArray", MethodType.methodType(Object[].class, int.class)); - } catch (NoSuchMethodException | IllegalAccessException ex) { + } catch (NoSuchMethodException ex) { + Error err = new InternalError("uncaught exception"); + err.initCause(ex); + throw err; + } catch (IllegalAccessException ex) { Error err = new InternalError("uncaught exception"); err.initCause(ex); throw err; --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/PAData.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/PAData.java @@ -280,7 +280,9 @@ .append(info.getSalt()) .append('\n'); } - } catch (IOException|Asn1Exception e) { + } catch (Asn1Exception e) { + sb.append("\t <Unparseable PA-ETYPE-INFO>\n"); + } catch (IOException e) { sb.append("\t <Unparseable PA-ETYPE-INFO>\n"); } } @@ -307,7 +309,9 @@ .encodeBuffer(s2kparams)); } } - } catch (IOException|Asn1Exception e) { + } catch (IOException e) { + sb.append("\t <Unparseable PA-ETYPE-INFO>\n"); + } catch (Asn1Exception e) { sb.append("\t <Unparseable PA-ETYPE-INFO>\n"); } } --- openjdk-boot/jdk/src/share/classes/sun/text/bidi/BidiBase.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/text/bidi/BidiBase.java @@ -3477,7 +3477,9 @@ try { Field f = clazz.getField(name); return f.get(null); - } catch (NoSuchFieldException | IllegalAccessException x) { + } catch (NoSuchFieldException x) { + throw new AssertionError(x); + } catch (IllegalAccessException x) { throw new AssertionError(x); } } diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java openjdk-boot/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java --- openjdk-boot.orig/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java 2013-02-20 04:34:29.274856281 +0000 +++ openjdk-boot/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java 2013-02-20 04:34:52.071217958 +0000 @@ -65,7 +65,10 @@ throw new RuntimeException("Duplicate untrusted certificate: " + cert.getSubjectX500Principal()); } - } catch (CertificateException | IOException e) { + } catch (IOException e) { + throw new RuntimeException( + "Incorrect untrusted certificate: " + alias, e); + } catch (CertificateException e) { throw new RuntimeException( "Incorrect untrusted certificate: " + alias, e); } diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java openjdk-boot/jdk/src/share/classes/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java --- openjdk-boot.orig/jdk/src/share/classes/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java 2013-06-27 15:56:57.456088537 +0100 +++ openjdk-boot/jdk/src/share/classes/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java 2013-06-27 16:02:12.857102777 +0100 @@ -402,7 +402,13 @@ try { ServerNotifForwarder.checkMBeanPermission(this.mBeanServer, candidate.getObjectName(),"addNotificationListener"); - } catch (InstanceNotFoundException | SecurityException e) { + } catch (InstanceNotFoundException e) { + if (logger.debugOn()) { + logger.debug("fetchNotifications", "candidate: " + candidate + " skipped. exception " + e); + } + ++nextSeq; + continue; + } catch (SecurityException e) { if (logger.debugOn()) { logger.debug("fetchNotifications", "candidate: " + candidate + " skipped. exception " + e); } diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/ProcessBuilder.java openjdk-boot/jdk/src/share/classes/java/lang/ProcessBuilder.java --- openjdk-boot.orig/jdk/src/share/classes/java/lang/ProcessBuilder.java 2013-06-27 15:56:27.295609027 +0100 +++ openjdk-boot/jdk/src/share/classes/java/lang/ProcessBuilder.java 2013-06-27 16:00:59.631938678 +0100 @@ -1024,10 +1024,10 @@ dir, redirects, redirectErrorStream); - } catch (IOException | IllegalArgumentException e) { + } catch (IOException e) { String exceptionInfo = ": " + e.getMessage(); Throwable cause = e; - if ((e instanceof IOException) && security != null) { + if (security != null) { // Can not disclose the fail reason for read-protected files. try { security.checkRead(prog); @@ -1039,6 +1039,16 @@ // It's much easier for us to create a high-quality error // message than the low-level C code which found the problem. throw new IOException( + "Cannot run program \"" + prog + "\"" + + (dir == null ? "" : " (in directory \"" + dir + "\")") + + exceptionInfo, + cause); + } catch (IllegalArgumentException e) { + String exceptionInfo = ": " + e.getMessage(); + Throwable cause = e; + // It's much easier for us to create a high-quality error + // message than the low-level C code which found the problem. + throw new IOException( "Cannot run program \"" + prog + "\"" + (dir == null ? "" : " (in directory \"" + dir + "\")") + exceptionInfo,