changeset 1510:c7c41a044e7c

8006566: Remove transient lambda-related guards from JavacParser Summary: Remove transitional internal flag for allowing intersection types in cast Reviewed-by: jjg
author mcimadamore
date Mon, 21 Jan 2013 20:14:39 +0000
parents 7873d37f5b37
children b12ffdfa1341
files src/share/classes/com/sun/tools/javac/parser/JavacParser.java test/tools/javac/cast/intersection/IntersectionTypeCastTest.java test/tools/javac/cast/intersection/IntersectionTypeParserTest.java test/tools/javac/cast/intersection/model/Model01.java test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java test/tools/javac/lambda/Intersection01.java test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java
diffstat 7 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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) {
--- 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" +
--- 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;
--- 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<?>)()->{};
--- 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 {
 
--- 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) {