8005782: get rid of javadoc errors, warnings in nashorn build
authorsundar
Tue, 08 Jan 2013 08:51:00 +0530
changeset 16154 de44634fa4ec
parent 16153 60de45bf54b0
child 16155 a8ab83cbaa49
8005782: get rid of javadoc errors, warnings in nashorn build Reviewed-by: lagergren
nashorn/make/build.xml
nashorn/make/project.properties
nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java
nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java
nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java
--- a/nashorn/make/build.xml	Mon Jan 07 14:41:16 2013 -0400
+++ b/nashorn/make/build.xml	Tue Jan 08 08:51:00 2013 +0530
@@ -63,7 +63,7 @@
 
   <!-- do it only if ASM is not available -->
   <target name="compile-asm" depends="prepare" unless="asm.available">
-    <javac srcdir="${asm.src.dir}"
+    <javac srcdir="${jdk.asm.src.dir}"
            destdir="${build.classes.dir}"
            excludes="**/optimizer/* **/xml/* **/attrs/*"
            source="${javac.source}"
@@ -142,15 +142,20 @@
     </jar>
   </target>
 
-  <target name="javadoc" depends="compile-asm">
-    <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html" windowtitle="${nashorn.product.name} ${nashorn.version}">
+  <target name="javadoc" depends="prepare">
+    <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html" windowtitle="${nashorn.product.name} ${nashorn.version}" additionalparam="-quiet" failonerror="true">
       <classpath>
         <pathelement location="${build.classes.dir}"/>
         <pathelement location="${dynalink.jar}"/>
       </classpath>
       <fileset dir="${src.dir}" includes="**/*.java"/>
-      <link href="http://docs.oracle.com/javase/7/docs/api"/>
-      <link href="http://szegedi.github.com/dynalink/0.4/javadoc"/>
+      <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
+      <link href="http://docs.oracle.com/javase/7/docs/api/"/>
+      <link href="http://szegedi.github.com/dynalink/0.4/javadoc/"/>
+      <!-- The following tags are used only in ASM sources - just ignore these -->
+      <tag name="label" description="label tag in ASM sources" enabled="false"/>
+      <tag name="linked" description="linked tag in ASM sources" enabled="false"/>
+      <tag name="associates" description="associates tag in ASM sources" enabled="false"/>
     </javadoc>
   </target>
 
--- a/nashorn/make/project.properties	Mon Jan 07 14:41:16 2013 -0400
+++ b/nashorn/make/project.properties	Tue Jan 08 08:51:00 2013 +0530
@@ -23,6 +23,9 @@
 
 application.title=nashorn
 
+# location of JDK embedded ASM sources
+jdk.asm.src.dir=../jdk/src/share/classes/jdk/internal
+
 # source and target levels
 build.compiler=modern
 javac.source=1.7
@@ -58,10 +61,6 @@
 dist.jar=${dist.dir}/nashorn.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 
-# directory where asm project lives
-asm.dir=../asm
-asm.src.dir=${asm.dir}/src
-
 # jars refererred
 file.reference.testng.jar=test/lib/testng.jar
 
--- a/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java	Mon Jan 07 14:41:16 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java	Tue Jan 08 08:51:00 2013 +0530
@@ -155,7 +155,7 @@
 
     /**
      * Constructor - internal use from ClassEmitter only
-     * @see ClassEmitter.method
+     * @see ClassEmitter#method
      *
      * @param classEmitter the class emitter weaving the class this method is in
      * @param method       a method visitor
@@ -166,7 +166,7 @@
 
     /**
      * Constructor - internal use from ClassEmitter only
-     * @see ClassEmitter.method
+     * @see ClassEmitter#method
      *
      * @param classEmitter the class emitter weaving the class this method is in
      * @param method       a method visitor
--- a/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java	Mon Jan 07 14:41:16 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java	Tue Jan 08 08:51:00 2013 +0530
@@ -38,13 +38,16 @@
     private static final String MESSAGES_RESOURCE = "jdk.nashorn.internal.runtime.resources.Messages";
 
     // Without do privileged, under security manager messages can not be loaded.
-    private static final ResourceBundle MESSAGES_BUNDLE = AccessController.doPrivileged(
+    private static final ResourceBundle MESSAGES_BUNDLE;
+    static {
+        MESSAGES_BUNDLE = AccessController.doPrivileged(
         new PrivilegedAction<ResourceBundle>() {
             @Override
             public ResourceBundle run() {
                 return ResourceBundle.getBundle(MESSAGES_RESOURCE, Locale.getDefault());
             }
         });
+    }
 
     private ECMAErrors() {
     }
--- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java	Mon Jan 07 14:41:16 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java	Tue Jan 08 08:51:00 2013 +0530
@@ -417,8 +417,8 @@
     /**
      * Prevents properties in map from being modified.
      *
-     * @return New map with {@link NOT_EXTENSIBLE} flag set and properties with
-     * {@link Property.NOT_CONFIGURABLE} set.
+     * @return New map with {@link #NOT_EXTENSIBLE} flag set and properties with
+     * {@link Property#NOT_CONFIGURABLE} set.
      */
     PropertyMap seal() {
         PropertyHashMap newProperties = EMPTY_MAP;
@@ -437,7 +437,7 @@
      * Prevents properties in map from being modified or written to.
      *
      * @return New map with {@link #NOT_EXTENSIBLE} flag set and properties with
-     * {@link Property.NOT_CONFIGURABLE} and {@link Property.NOT_WRITABLE} set.
+     * {@link Property#NOT_CONFIGURABLE} and {@link Property#NOT_WRITABLE} set.
      */
     PropertyMap freeze() {
         PropertyHashMap newProperties = EMPTY_MAP;