# HG changeset patch # User mcimadamore # Date 1358799279 0 # Node ID c7c41a044e7c88a4bf837e2d62022dfb72c5f508 # Parent 7873d37f5b377a777c06e2c968d7b3e71f898af8 8006566: Remove transient lambda-related guards from JavacParser Summary: Remove transitional internal flag for allowing intersection types in cast Reviewed-by: jjg diff -r 7873d37f5b37 -r c7c41a044e7c src/share/classes/com/sun/tools/javac/parser/JavacParser.java --- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Mon Jan 21 20:13:56 2013 +0000 +++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Mon Jan 21 20:14:39 2013 +0000 @@ -124,9 +124,7 @@ this.allowLambda = source.allowLambda(); this.allowMethodReferences = source.allowMethodReferences(); this.allowDefaultMethods = source.allowDefaultMethods(); - this.allowIntersectionTypesInCast = - source.allowIntersectionTypesInCast() && - fac.options.isSet("allowIntersectionTypes"); + this.allowIntersectionTypesInCast = source.allowIntersectionTypesInCast(); this.keepDocComments = keepDocComments; docComments = newDocCommentTable(keepDocComments, fac); this.keepLineMap = keepLineMap; diff -r 7873d37f5b37 -r c7c41a044e7c test/tools/javac/cast/intersection/IntersectionTypeCastTest.java --- a/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java Mon Jan 21 20:13:56 2013 +0000 +++ b/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java Mon Jan 21 20:14:39 2013 +0000 @@ -287,8 +287,7 @@ final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); JavacTask ct = (JavacTask)tool.getTask(null, fm.get(), diagChecker, - Arrays.asList("-XDallowIntersectionTypes"), - null, Arrays.asList(source)); + null, null, Arrays.asList(source)); try { ct.analyze(); } catch (Throwable ex) { diff -r 7873d37f5b37 -r c7c41a044e7c test/tools/javac/cast/intersection/IntersectionTypeParserTest.java --- a/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java Mon Jan 21 20:13:56 2013 +0000 +++ b/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java Mon Jan 21 20:14:39 2013 +0000 @@ -170,7 +170,7 @@ void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception { checkCount++; JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, - Arrays.asList("-XDallowIntersectionTypes"), null, Arrays.asList(source)); + null, null, Arrays.asList(source)); ct.parse(); if (diagChecker.errorFound) { throw new Error("Unexpected parser error for source:\n" + diff -r 7873d37f5b37 -r c7c41a044e7c test/tools/javac/cast/intersection/model/Model01.java --- a/test/tools/javac/cast/intersection/model/Model01.java Mon Jan 21 20:13:56 2013 +0000 +++ b/test/tools/javac/cast/intersection/model/Model01.java Mon Jan 21 20:14:39 2013 +0000 @@ -27,7 +27,7 @@ * @summary Add support for intersection types in cast expression * @library /tools/javac/lib * @build JavacTestingAbstractProcessor ModelChecker - * @compile -XDallowIntersectionTypes -processor ModelChecker Model01.java + * @compile -processor ModelChecker Model01.java */ import javax.lang.model.element.ElementKind; diff -r 7873d37f5b37 -r c7c41a044e7c test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java --- a/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java Mon Jan 21 20:13:56 2013 +0000 +++ b/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java Mon Jan 21 20:14:39 2013 +0000 @@ -23,7 +23,6 @@ // key: compiler.err.prob.found.req // key: compiler.misc.secondary.bound.must.be.marker.intf -// options: -XDallowIntersectionTypes class SecondaryBoundMustBeMarkerInterface { Runnable r = (Runnable & Comparable)()->{}; diff -r 7873d37f5b37 -r c7c41a044e7c test/tools/javac/lambda/Intersection01.java --- a/test/tools/javac/lambda/Intersection01.java Mon Jan 21 20:13:56 2013 +0000 +++ b/test/tools/javac/lambda/Intersection01.java Mon Jan 21 20:14:39 2013 +0000 @@ -25,7 +25,7 @@ * @test * @bug 8002099 * @summary Add support for intersection types in cast expression - * @compile/fail/ref=Intersection01.out -XDallowIntersectionTypes -XDrawDiagnostics Intersection01.java + * @compile/fail/ref=Intersection01.out -XDrawDiagnostics Intersection01.java */ class Intersection01 { diff -r 7873d37f5b37 -r c7c41a044e7c test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java --- a/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java Mon Jan 21 20:13:56 2013 +0000 +++ b/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java Mon Jan 21 20:14:39 2013 +0000 @@ -248,7 +248,7 @@ void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception { JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, - Arrays.asList("-XDallowIntersectionTypes"), null, Arrays.asList(source)); + null, null, Arrays.asList(source)); try { ct.analyze(); } catch (Throwable ex) {