changeset 884:712be35e40b5

6949040: java.dyn package must be compiled with -target 7 or better Summary: issue error (rather than warning) when @PolymorphicSignature is found and target < 7 Reviewed-by: jjg
author mcimadamore
date Fri, 14 Jan 2011 09:46:44 +0000
parents c8d312dd17bc
children 7c7c1787fbbe
files src/share/classes/com/sun/tools/javac/comp/MemberEnter.java src/share/classes/com/sun/tools/javac/resources/compiler.properties test/tools/javac/diags/examples.not-yet.txt
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Jan 14 09:45:52 2011 +0000
+++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Jan 14 09:46:44 2011 +0000
@@ -781,8 +781,8 @@
                     types.isSameType(c.type, syms.polymorphicSignatureType)) {
                 if (!target.hasMethodHandles()) {
                     // Somebody is compiling JDK7 source code to a JDK6 target.
-                    // Make it a strict warning, since it is unlikely but important.
-                    log.strictWarning(env.tree.pos(),
+                    // Make it an error, since it is unlikely but important.
+                    log.error(env.tree.pos(),
                             "wrong.target.for.polymorphic.signature.definition",
                             target.name);
                 }
--- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Jan 14 09:45:52 2011 +0000
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Jan 14 09:46:44 2011 +0000
@@ -128,7 +128,7 @@
 compiler.err.no.superclass=\
     {0} has no superclass
 
-compiler.warn.wrong.target.for.polymorphic.signature.definition=\
+compiler.err.wrong.target.for.polymorphic.signature.definition=\
     MethodHandle API building requires -target 7 runtimes or better; current is -target {0}
 
 compiler.err.concrete.inheritance.conflict=\
--- a/test/tools/javac/diags/examples.not-yet.txt	Fri Jan 14 09:45:52 2011 +0000
+++ b/test/tools/javac/diags/examples.not-yet.txt	Fri Jan 14 09:46:44 2011 +0000
@@ -43,6 +43,7 @@
 compiler.err.unexpected.type
 compiler.err.unknown.enum.constant                      # in bad class file
 compiler.err.unsupported.cross.fp.lit                   # Scanner: host system dependent
+compiler.err.wrong.target.for.polymorphic.signature.definition     # Transitional 292
 compiler.misc.assignment.from.super-bound
 compiler.misc.assignment.to.extends-bound
 compiler.misc.bad.class.file.header                     # bad class file
@@ -112,4 +113,3 @@
 compiler.warn.unchecked.assign                          # DEAD, replaced by compiler.misc.unchecked.assign
 compiler.warn.unchecked.cast.to.type                    # DEAD, replaced by compiler.misc.unchecked.cast.to.type
 compiler.warn.unexpected.archive.file                   # Paths: zip file with unknown extn
-compiler.warn.wrong.target.for.polymorphic.signature.definition     # Transitional 292