8006566: Remove transient lambda-related guards from JavacParser

Mon, 21 Jan 2013 20:14:39 +0000

author
mcimadamore
date
Mon, 21 Jan 2013 20:14:39 +0000
changeset 1511
c7c41a044e7c
parent 1510
7873d37f5b37
child 1512
b12ffdfa1341

8006566: Remove transient lambda-related guards from JavacParser
Summary: Remove transitional internal flag for allowing intersection types in cast
Reviewed-by: jjg

src/share/classes/com/sun/tools/javac/parser/JavacParser.java file | annotate | diff | comparison | revisions
test/tools/javac/cast/intersection/IntersectionTypeCastTest.java file | annotate | diff | comparison | revisions
test/tools/javac/cast/intersection/IntersectionTypeParserTest.java file | annotate | diff | comparison | revisions
test/tools/javac/cast/intersection/model/Model01.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java file | annotate | diff | comparison | revisions
test/tools/javac/lambda/Intersection01.java file | annotate | diff | comparison | revisions
test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Jan 21 20:13:56 2013 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Jan 21 20:14:39 2013 +0000
     1.3 @@ -124,9 +124,7 @@
     1.4          this.allowLambda = source.allowLambda();
     1.5          this.allowMethodReferences = source.allowMethodReferences();
     1.6          this.allowDefaultMethods = source.allowDefaultMethods();
     1.7 -        this.allowIntersectionTypesInCast =
     1.8 -                source.allowIntersectionTypesInCast() &&
     1.9 -                fac.options.isSet("allowIntersectionTypes");
    1.10 +        this.allowIntersectionTypesInCast = source.allowIntersectionTypesInCast();
    1.11          this.keepDocComments = keepDocComments;
    1.12          docComments = newDocCommentTable(keepDocComments, fac);
    1.13          this.keepLineMap = keepLineMap;
     2.1 --- a/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Mon Jan 21 20:13:56 2013 +0000
     2.2 +++ b/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Mon Jan 21 20:14:39 2013 +0000
     2.3 @@ -287,8 +287,7 @@
     2.4          final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
     2.5  
     2.6          JavacTask ct = (JavacTask)tool.getTask(null, fm.get(), diagChecker,
     2.7 -                Arrays.asList("-XDallowIntersectionTypes"),
     2.8 -                null, Arrays.asList(source));
     2.9 +                null, null, Arrays.asList(source));
    2.10          try {
    2.11              ct.analyze();
    2.12          } catch (Throwable ex) {
     3.1 --- a/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java	Mon Jan 21 20:13:56 2013 +0000
     3.2 +++ b/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java	Mon Jan 21 20:14:39 2013 +0000
     3.3 @@ -170,7 +170,7 @@
     3.4      void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
     3.5          checkCount++;
     3.6          JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
     3.7 -                Arrays.asList("-XDallowIntersectionTypes"), null, Arrays.asList(source));
     3.8 +                null, null, Arrays.asList(source));
     3.9          ct.parse();
    3.10          if (diagChecker.errorFound) {
    3.11              throw new Error("Unexpected parser error for source:\n" +
     4.1 --- a/test/tools/javac/cast/intersection/model/Model01.java	Mon Jan 21 20:13:56 2013 +0000
     4.2 +++ b/test/tools/javac/cast/intersection/model/Model01.java	Mon Jan 21 20:14:39 2013 +0000
     4.3 @@ -27,7 +27,7 @@
     4.4   * @summary Add support for intersection types in cast expression
     4.5   * @library /tools/javac/lib
     4.6   * @build JavacTestingAbstractProcessor ModelChecker
     4.7 - * @compile -XDallowIntersectionTypes -processor ModelChecker Model01.java
     4.8 + * @compile -processor ModelChecker Model01.java
     4.9   */
    4.10  
    4.11  import javax.lang.model.element.ElementKind;
     5.1 --- a/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java	Mon Jan 21 20:13:56 2013 +0000
     5.2 +++ b/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java	Mon Jan 21 20:14:39 2013 +0000
     5.3 @@ -23,7 +23,6 @@
     5.4  
     5.5  // key: compiler.err.prob.found.req
     5.6  // key: compiler.misc.secondary.bound.must.be.marker.intf
     5.7 -// options: -XDallowIntersectionTypes
     5.8  
     5.9  class SecondaryBoundMustBeMarkerInterface {
    5.10      Runnable r = (Runnable & Comparable<?>)()->{};
     6.1 --- a/test/tools/javac/lambda/Intersection01.java	Mon Jan 21 20:13:56 2013 +0000
     6.2 +++ b/test/tools/javac/lambda/Intersection01.java	Mon Jan 21 20:14:39 2013 +0000
     6.3 @@ -25,7 +25,7 @@
     6.4   * @test
     6.5   * @bug 8002099
     6.6   * @summary Add support for intersection types in cast expression
     6.7 - * @compile/fail/ref=Intersection01.out -XDallowIntersectionTypes -XDrawDiagnostics Intersection01.java
     6.8 + * @compile/fail/ref=Intersection01.out -XDrawDiagnostics Intersection01.java
     6.9   */
    6.10  class Intersection01 {
    6.11  
     7.1 --- a/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java	Mon Jan 21 20:13:56 2013 +0000
     7.2 +++ b/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java	Mon Jan 21 20:14:39 2013 +0000
     7.3 @@ -248,7 +248,7 @@
     7.4  
     7.5      void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
     7.6          JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
     7.7 -                Arrays.asList("-XDallowIntersectionTypes"), null, Arrays.asList(source));
     7.8 +                null, null, Arrays.asList(source));
     7.9          try {
    7.10              ct.analyze();
    7.11          } catch (Throwable ex) {

mercurial