changeset 5712:dfcb73ac6ba2

made invalid javadoc cause a JDT error switched to using -XDignore.symbol.file flag to suppress internal API warnings emitted by javac and javadoc
author Doug Simon <doug.simon@oracle.com>
date Thu, 28 Jun 2012 11:30:21 +0200
parents 4d7175cf3526
children 1d2eeb28537f 10341299528c
files graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CallingConvention.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test7005594.java mx/eclipse-settings/org.eclipse.jdt.core.prefs mxtool/mx.py
diffstat 4 files changed, 23 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CallingConvention.java	Thu Jun 28 11:11:12 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CallingConvention.java	Thu Jun 28 11:30:21 2012 +0200
@@ -33,8 +33,7 @@
 public class CallingConvention {
 
     /**
-     * Constants denoting the type of a call for which a calling convention is
-     * {@linkplain RegisterConfig#getCallingConvention(Type, Kind[], TargetDescription, boolean) requested}.
+     * Constants denoting the type of a call for which a calling convention is requested.
      */
     public enum Type {
         /**
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test7005594.java	Thu Jun 28 11:11:12 2012 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test7005594.java	Thu Jun 28 11:30:21 2012 +0200
@@ -28,9 +28,7 @@
  * @summary Array overflow not handled correctly with loop optimzations
  *
  * @run shell Test7005594.sh
- * @##Disabled huge heap##Runs: 0 = 95
  */
-@SuppressWarnings("javadoc")
 public class Test7005594 {
 
     private static int test0(byte[] a) {
--- a/mx/eclipse-settings/org.eclipse.jdt.core.prefs	Thu Jun 28 11:11:12 2012 +0200
+++ b/mx/eclipse-settings/org.eclipse.jdt.core.prefs	Thu Jun 28 11:30:21 2012 +0200
@@ -54,7 +54,7 @@
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
--- a/mxtool/mx.py	Thu Jun 28 11:11:12 2012 +0200
+++ b/mxtool/mx.py	Thu Jun 28 11:30:21 2012 +0200
@@ -1248,27 +1248,10 @@
         try:
             if jdtJar is None:
                 log('Compiling Java sources for {0} with javac...'.format(p.name))
-                errFilt = None
+                javacCmd = [java().javac, '-g', '-J-Xmx1g', '-source', args.compliance, '-classpath', cp, '-d', outputDir, '@' + argfile.name]
                 if not args.warnAPI:
-                    class Filter:
-                        """
-                        Class to errFilt the 'is Sun proprietary API and may be removed in a future release'
-                        warning when compiling the VM classes.
-
-                        """
-                        def __init__(self):
-                            self.c = 0
-
-                        def eat(self, line):
-                            if 'proprietary API' in line:
-                                self.c = 2
-                            elif self.c != 0:
-                                self.c -= 1
-                            else:
-                                log(line.rstrip())
-                    errFilt=Filter().eat
-
-                run([java().javac, '-g', '-J-Xmx1g', '-source', args.compliance, '-classpath', cp, '-d', outputDir, '@' + argfile.name], err=errFilt)
+                    javacCmd.append('-XDignore.symbol.file')
+                run(javacCmd)
             else:
                 log('Compiling Java sources for {0} with JDT...'.format(p.name))
                 jdtArgs = [java().java, '-Xmx1g', '-jar', jdtJar,
@@ -1965,6 +1948,7 @@
     parser.add_argument('--unified', action='store_true', help='put javadoc in a single directory instead of one per project')
     parser.add_argument('--force', action='store_true', help='(re)generate javadoc even if package-list file exists')
     parser.add_argument('--projects', action='store', help='comma separated projects to process (omit to process all projects)')
+    parser.add_argument('--Wapi', action='store_true', dest='warnAPI', help='show warnings about using internal APIs')
     parser.add_argument('--argfile', action='store', help='name of file containing extra javadoc options')
     parser.add_argument('--arg', action='append', dest='extra_args', help='extra Javadoc arguments (e.g. --arg @-use)', metavar='@<arg>', default=[])
     parser.add_argument('-m', '--memory', action='store', help='-Xmx value to pass to underlying JVM')
@@ -2045,9 +2029,13 @@
             overview = []
             if exists(overviewFile):
                 overview = ['-overview', overviewFile]
+            nowarnAPI = []
+            if not args.warnAPI:
+                nowarnAPI.append('-XDignore.symbol.file')
             log('Generating {2} for {0} in {1}'.format(p.name, out, docDir))
             run([java().javadoc, memory,
                  '-windowtitle', p.name + ' javadoc',
+                 '-XDignore.symbol.file',
                  '-classpath', cp,
                  '-quiet',
                  '-d', out,
@@ -2055,6 +2043,7 @@
                  links +
                  extraArgs +
                  overview +
+                 nowarnAPI +
                  list(pkgs))
             log('Generated {2} for {0} in {1}'.format(p.name, out, docDir))
     else:
@@ -2075,8 +2064,19 @@
             out = join(args.base, docDir)
         cp = classpath()
         sp = os.pathsep.join(sp)
+        nowarnAPI = []
+        if not args.warnAPI:
+            nowarnAPI.append('-XDignore.symbol.file')
         log('Generating {2} for {0} in {1}'.format(', '.join(names), out, docDir))
-        run([java().javadoc, memory, '-classpath', cp, '-quiet', '-d', out, '-sourcepath', sp] + links + extraArgs + list(pkgs))
+        run([java().javadoc, memory,
+             '-classpath', cp,
+             '-quiet',
+             '-d', out,
+             '-sourcepath', sp] +
+             links +
+             extraArgs +
+             nowarnAPI +
+             list(pkgs))
         log('Generated {2} for {0} in {1}'.format(', '.join(names), out, docDir))
 
 def findclass(args):