Hello.
In langtools, our policy is *not* to have explicit -source or -target
flags in the regression tests unless a non-default older source/target
is needed. Unnecessary options have been removed from both langtools
and jdk. [1] [2]
So, I recommend the compile line for this test just be
@compile InvokeGenericTest.java
-Joe
[1] 6843761: Update langtools tests to remove unncessary -source and
-target options
http://hg.openjdk.java.net/jdk7/tl/langtools/rev/84061bd68019
[2] 6907177: Update jdk tests to remove unncessary -source and -target
options
http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1755493c5774
Alan Bateman wrote:
John,
This test fails in the jdk8/tl because javac now defaults to
source/target 8 and the test specifies -target 7 without specifying
the source. This means we can run the java/lang/** tests without
getting at least one failure. Any objection if I add -source 7 to the
compile tag? I assume at some point these tests will move to
source/target 8.
-Alan
diff --git a/test/java/lang/invoke/InvokeGenericTest.java
b/test/java/lang/invoke/InvokeGenericTest.java
--- a/test/java/lang/invoke/InvokeGenericTest.java
+++ b/test/java/lang/invoke/InvokeGenericTest.java
@@ -25,7 +25,7 @@
/* @test
* @summary unit tests for java.lang.invoke.MethodHandle.invoke
- * @compile -target 7 InvokeGenericTest.java
+ * @compile -source 7 -target 7 InvokeGenericTest.java
* @run junit/othervm test.java.lang.invoke.InvokeGenericTest
*/