changeset 6354:48a71b1bba2c

Fixes ahead of langtools merge with jdk8-b61: *) fix test-ng tests that fail due to removal of unbound constructor ref support *) adjust code in beans so that semantics of throw statement with conditional is preserved
author mcimadamore
date Fri, 26 Oct 2012 00:26:11 +0100
parents 7793297b00ae
children c30c20389172
files src/share/classes/java/beans/EventHandler.java test-ng/tests/org/openjdk/tests/javac/MethodReferenceTestKinds.java test-ng/tests/org/openjdk/tests/javac/MethodReferenceTestNewInner.java
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/beans/EventHandler.java	Thu Oct 25 15:46:10 2012 -0700
+++ b/src/share/classes/java/beans/EventHandler.java	Fri Oct 26 00:26:11 2012 +0100
@@ -485,9 +485,9 @@
             }
             catch (InvocationTargetException ex) {
                 Throwable th = ex.getTargetException();
-                throw (th instanceof RuntimeException)
+                throw (RuntimeException)((th instanceof RuntimeException)
                         ? (RuntimeException) th
-                        : new RuntimeException(th);
+                        : new RuntimeException(th));
             }
         }
         return null;
--- a/test-ng/tests/org/openjdk/tests/javac/MethodReferenceTestKinds.java	Thu Oct 25 15:46:10 2012 -0700
+++ b/test-ng/tests/org/openjdk/tests/javac/MethodReferenceTestKinds.java	Fri Oct 26 00:26:11 2012 +0100
@@ -137,7 +137,7 @@
 	SN1 var = MethodReferenceTestKindsBase::new;
 	assertEquals(var.make("name").toString(), "MethodReferenceTestKindsBase(name)");
     }
-
+/* unbound inner case not supported anymore (dropped by EG)
     public void testMRUnboundInner() {
 	SXN0 var = MethodReferenceTestKinds.In::new;
 	assertEquals(var.make(inst("out")).toString(), "In(blank)");
@@ -147,7 +147,7 @@
 	SXN1 var = MethodReferenceTestKinds.In::new;
 	assertEquals(var.make(inst("out"), "name").toString(), "In(name)");
     }
-
+*/
     public void testMRImplicitInner() {
 	SN0 var = MethodReferenceTestKinds.In::new;
 	assertEquals(var.make().toString(), "In(blank)");
--- a/test-ng/tests/org/openjdk/tests/javac/MethodReferenceTestNewInner.java	Thu Oct 25 15:46:10 2012 -0700
+++ b/test-ng/tests/org/openjdk/tests/javac/MethodReferenceTestNewInner.java	Fri Oct 26 00:26:11 2012 +0100
@@ -108,13 +108,14 @@
         }
     }
 
+/* unbound constructor case not supported anymore (dropped by EG)
     public static void testConstructorReferenceP() {
         MP<N0> q;
 
 	q = N0::new;
         assertEquals(q.m(new MethodReferenceTestNewInner()).getClass().getSimpleName(), "N0");
     }
-
+*/
     public void testConstructorReference0() {
         M0<N0> q;