6949040: java.dyn package must be compiled with -target 7 or better

Fri, 14 Jan 2011 09:46:44 +0000

author
mcimadamore
date
Fri, 14 Jan 2011 09:46:44 +0000
changeset 822
712be35e40b5
parent 821
c8d312dd17bc
child 823
7c7c1787fbbe

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

src/share/classes/com/sun/tools/javac/comp/MemberEnter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/resources/compiler.properties file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples.not-yet.txt file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Jan 14 09:45:52 2011 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Jan 14 09:46:44 2011 +0000
     1.3 @@ -781,8 +781,8 @@
     1.4                      types.isSameType(c.type, syms.polymorphicSignatureType)) {
     1.5                  if (!target.hasMethodHandles()) {
     1.6                      // Somebody is compiling JDK7 source code to a JDK6 target.
     1.7 -                    // Make it a strict warning, since it is unlikely but important.
     1.8 -                    log.strictWarning(env.tree.pos(),
     1.9 +                    // Make it an error, since it is unlikely but important.
    1.10 +                    log.error(env.tree.pos(),
    1.11                              "wrong.target.for.polymorphic.signature.definition",
    1.12                              target.name);
    1.13                  }
     2.1 --- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Jan 14 09:45:52 2011 +0000
     2.2 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Jan 14 09:46:44 2011 +0000
     2.3 @@ -128,7 +128,7 @@
     2.4  compiler.err.no.superclass=\
     2.5      {0} has no superclass
     2.6  
     2.7 -compiler.warn.wrong.target.for.polymorphic.signature.definition=\
     2.8 +compiler.err.wrong.target.for.polymorphic.signature.definition=\
     2.9      MethodHandle API building requires -target 7 runtimes or better; current is -target {0}
    2.10  
    2.11  compiler.err.concrete.inheritance.conflict=\
     3.1 --- a/test/tools/javac/diags/examples.not-yet.txt	Fri Jan 14 09:45:52 2011 +0000
     3.2 +++ b/test/tools/javac/diags/examples.not-yet.txt	Fri Jan 14 09:46:44 2011 +0000
     3.3 @@ -43,6 +43,7 @@
     3.4  compiler.err.unexpected.type
     3.5  compiler.err.unknown.enum.constant                      # in bad class file
     3.6  compiler.err.unsupported.cross.fp.lit                   # Scanner: host system dependent
     3.7 +compiler.err.wrong.target.for.polymorphic.signature.definition     # Transitional 292
     3.8  compiler.misc.assignment.from.super-bound
     3.9  compiler.misc.assignment.to.extends-bound
    3.10  compiler.misc.bad.class.file.header                     # bad class file
    3.11 @@ -112,4 +113,3 @@
    3.12  compiler.warn.unchecked.assign                          # DEAD, replaced by compiler.misc.unchecked.assign
    3.13  compiler.warn.unchecked.cast.to.type                    # DEAD, replaced by compiler.misc.unchecked.cast.to.type
    3.14  compiler.warn.unexpected.archive.file                   # Paths: zip file with unknown extn
    3.15 -compiler.warn.wrong.target.for.polymorphic.signature.definition     # Transitional 292

mercurial