RFR 8070507: LambdaLambdaSerialized can fail in -agentvm mode
Joel Borggrén-Franck
joel.franck at oracle.com
Wed Jan 21 17:27:43 UTC 2015
Hi,
Can I get a review for this small fix for two tests that can interfere with each other when run concurrently.
Fix is to move the interfaces to be nested instead of auxiliary. Patch inline.
cheers
/Joel
diff -r 1580b10e028a test/tools/javac/lambda/LambdaLambdaSerialized.java
--- a/test/tools/javac/lambda/LambdaLambdaSerialized.java Tue Jan 20 21:49:55 2015 +0100
+++ b/test/tools/javac/lambda/LambdaLambdaSerialized.java Wed Jan 21 18:09:47 2015 +0100
@@ -67,13 +67,13 @@
out.writeObject(lamb);
}
- static void readAssert(ObjectInputStream in, String expected) throws IOException, ClassNotFoundException {
- LSI<LSI<Map>> ls = (LSI<LSI<Map>>) in.readObject();
+ static void readAssert(ObjectInputStream in, String expected) throws IOException, ClassNotFoundException {
+ LSI<LSI<Map>> ls = (LSI<LSI<Map>>)in.readObject();
Map result = ls.get().get();
System.out.printf("Result: %s\n", result);
}
+
+ interface LSI<T> extends Serializable {
+ T get();
+ }
}
-
-interface LSI<T> extends Serializable {
- T get();
-}
diff -r 1580b10e028a test/tools/javac/lambda/SerializedLambdaInInit.java
--- a/test/tools/javac/lambda/SerializedLambdaInInit.java Tue Jan 20 21:49:55 2015 +0100
+++ b/test/tools/javac/lambda/SerializedLambdaInInit.java Wed Jan 21 18:09:47 2015 +0100
@@ -111,8 +111,8 @@
}
}
}
+
+ interface LSI extends Serializable {
+ String convert(String x);
+ }
}
-
-interface LSI extends Serializable {
- String convert(String x);
-}
More information about the compiler-dev
mailing list