changeset 3840:03c2338ea473

8171255: Javac generates Deprecated class file attribute for @deprecated javadoc tag on module declaration. Reviewed-by: mcimadamore, anazarov
author jjg
date Mon, 19 Dec 2016 11:15:01 -0800
parents c8b254867ba0
children e52b5bafd8b8
files src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java test/tools/javac/modules/AnnotationsOnModules.java
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Mon Dec 19 11:07:44 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Mon Dec 19 11:15:01 2016 -0800
@@ -1810,7 +1810,7 @@
         acount += writeEnclosingMethodAttribute(c);
         if (c.owner.kind == MDL) {
             acount += writeModuleAttribute(c);
-            acount += writeFlagAttrs(c.owner.flags());
+            acount += writeFlagAttrs(c.owner.flags() & ~DEPRECATED);
         }
         acount += writeExtraClassAttributes(c);
 
--- a/test/tools/javac/modules/AnnotationsOnModules.java	Mon Dec 19 11:07:44 2016 -0800
+++ b/test/tools/javac/modules/AnnotationsOnModules.java	Mon Dec 19 11:15:01 2016 -0800
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @bug 8159602 8170549 8171255
  * @summary Test annotations on module declaration.
  * @library /tools/lib
  * @modules jdk.compiler/com.sun.tools.javac.api
@@ -92,7 +93,7 @@
         }
     }
 
-    //Test @ignore JDK-8171255
+    @Test
     public void testSimpleJavadocDeprecationTag(Path base) throws Exception {
         Path moduleSrc = base.resolve("module-src");
         Path m1 = moduleSrc.resolve("src1/A");