meth.patch
author twisti
Mon Oct 05 18:46:51 2009 +0200 (4 months ago)
changeset 35 9197796589d5
parent 344524a655b64e
permissions -rw-r--r--
series: Updated to be4c695c22cf.
meth.patch: Likewise.
        1 changes entrained after 6829189 appear in meth.patch proper
        2 
        3 diff --git a/src/share/classes/com/sun/tools/javac/comp/Resolve.java b/src/share/classes/com/sun/tools/javac/comp/Resolve.java
        4 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java
        5 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java
        6 @@ -936,6 +936,9 @@
        7          if (m == null) {
        8              // create the desired method
        9              m = new MethodSymbol(flags, name, mtype, c);
       10 +            // make it throw all exceptions
       11 +            Type exType = syms.throwableType;
       12 +            m.type.setThrown(List.of(exType));
       13              implicit.enter(m);
       14          }
       15          assert argumentsAcceptable(argtypes, types.memberType(site, m).getParameterTypes(),
       16 diff --git a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
       17 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
       18 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
       19 @@ -55,6 +55,9 @@
       20  import static com.sun.tools.javac.jvm.ClassFile.*;
       21  import static com.sun.tools.javac.jvm.ClassFile.Version.*;
       22  
       23 +// this Version is ambiguous with com.sun.tools.javac.util.Version
       24 +import com.sun.tools.javac.jvm.ClassFile.Version;
       25 +
       26  /** This class provides operations to read a classfile into an internal
       27   *  representation. The internal representation is anchored in a
       28   *  ClassSymbol which contains in its scope symbol representations
       29 diff --git a/test/tools/javac/meth/MakeNegTests.sh b/test/tools/javac/meth/MakeNegTests.sh
       30 --- a/test/tools/javac/meth/MakeNegTests.sh
       31 +++ b/test/tools/javac/meth/MakeNegTests.sh
       32 @@ -23,10 +23,10 @@
       33  # have any questions.
       34  #
       35  
       36 -# @test
       37 -# @bug 6754038
       38 -# @summary Verify correct rejection of strongly typed return values
       39 -# @run shell MakeNegTests.sh
       40 +# @#test
       41 +# @#bug 6754038
       42 +# @#summary Verify correct rejection of strongly typed return values
       43 +# @#run shell MakeNegTests.sh
       44  
       45  default_template=InvokeMH.java
       46  javacflags='-source 7 -target 7'
       47 diff --git a/test/tools/javac/quid/MakeNegTests.sh b/test/tools/javac/quid/MakeNegTests.sh
       48 --- a/test/tools/javac/quid/MakeNegTests.sh
       49 +++ b/test/tools/javac/quid/MakeNegTests.sh
       50 @@ -23,10 +23,10 @@
       51  # have any questions.
       52  #
       53  
       54 -# @test
       55 -# @bug 6746458
       56 -# @summary Verify correct rejection of illegal quoted identifiers.
       57 -# @run shell MakeNegTests.sh
       58 +# @#test
       59 +# @#bug 6746458
       60 +# @#summary Verify correct rejection of illegal quoted identifiers.
       61 +# @#run shell MakeNegTests.sh
       62  
       63  default_template=QuotedIdent.java
       64  # the rest of this file is a generic "//BAD"-line tester