changeset 1511:b12ffdfa1341

8005851: Remove support for synchronized interface methods Summary: Synchronized default methods are no longer supported Reviewed-by: jjg
author mcimadamore
date Mon, 21 Jan 2013 20:15:16 +0000
parents c7c41a044e7c
children cf84b07a82db
files src/share/classes/com/sun/tools/javac/code/Flags.java test/tools/javac/defaultMethods/syntax/TestDefaultMethodsSyntax.java test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java
diffstat 3 files changed, 4 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/code/Flags.java	Mon Jan 21 20:14:39 2013 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/Flags.java	Mon Jan 21 20:15:16 2013 +0000
@@ -280,7 +280,7 @@
                                 SYNCHRONIZED | FINAL | STRICTFP;
     public static final long
         ExtendedStandardFlags       = (long)StandardFlags | DEFAULT,
-        InterfaceDefaultMethodMask  = ABSTRACT | PUBLIC | STRICTFP | SYNCHRONIZED | DEFAULT,
+        InterfaceDefaultMethodMask  = ABSTRACT | PUBLIC | STRICTFP | DEFAULT,
         LocalVarFlags               = FINAL | PARAMETER;
 
 
--- a/test/tools/javac/defaultMethods/syntax/TestDefaultMethodsSyntax.java	Mon Jan 21 20:14:39 2013 +0000
+++ b/test/tools/javac/defaultMethods/syntax/TestDefaultMethodsSyntax.java	Mon Jan 21 20:15:16 2013 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7192245
+ * @bug 7192245 8005851
  * @summary Automatic test for checking set of allowed modifiers on interface methods
  */
 
@@ -183,10 +183,10 @@
             /* ABSTRACT */       { T   , T    , C        , F       , F       , F     , F     , F           , F    , F       , F   },
             /* STATIC */         { C   , C    , C        , C       , F       , F     , C     , C           , C    , C       , F   },
             /* NATIVE */         { C   , C    , C        , C       , F       , C     , F     , C           , C    , F       , F   },
-            /* SYNCHRONIZED */   { C   , C    , C        , C       , F       , C     , C     , F           , C    , C       , I   },
+            /* SYNCHRONIZED */   { C   , C    , C        , C       , F       , C     , C     , F           , C    , C       , F   },
             /* FINAL */          { C   , C    , C        , C       , F       , C     , C     , C           , F    , C       , F   },
             /* STRICTFP */       { C   , C    , C        , C       , F       , C     , F     , C           , C    , F       , I   },
-            /* DEFAULT */        { I   , I    , F        , F       , F       , F     , F     , I           , F    , I       , F   }};
+            /* DEFAULT */        { I   , I    , F        , F       , F       , F     , F     , F           , F    , I       , F   }};
     }
 
     enum MethodKind {
--- a/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java	Mon Jan 21 20:14:39 2013 +0000
+++ b/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java	Mon Jan 21 20:15:16 2013 +0000
@@ -807,20 +807,8 @@
             fail("Could not load class", e);
         }
     }
-
-    public void testSynchronizedDefault() {
-        try {
-            java.lang.Class.forName("org.openjdk.tests.vm.SynchronizedDefault");
-        } catch (Exception e) {
-            fail("Could not load class", e);
-        }
-    }
 }
 
 interface StrictfpDefault {
     default strictfp void m() {}
 }
-
-interface SynchronizedDefault {
-    default synchronized void m() {}
-}