8171255: Javac generates Deprecated class file attribute for @deprecated javadoc tag on module declaration.
authorjjg
Mon, 19 Dec 2016 11:15:01 -0800
changeset 42839 33f705c03879
parent 42838 3f9144d15025
child 42840 dfe1a03d4db4
8171255: Javac generates Deprecated class file attribute for @deprecated javadoc tag on module declaration. Reviewed-by: mcimadamore, anazarov
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
langtools/test/tools/javac/modules/AnnotationsOnModules.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Mon Dec 19 11:07:44 2016 -0800
+++ b/langtools/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/langtools/test/tools/javac/modules/AnnotationsOnModules.java	Mon Dec 19 11:07:44 2016 -0800
+++ b/langtools/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");