Fixup links in `Test{Parallel,Serial}`.

Review Request #3326 - Created Jan. 11, 2016 and submitted

Information
John Sirois
pants
jsirois/javadoc/fix_for_java8
2789
Reviewers
pants-reviews
qma, zundel
Java 8's javadoc flags these links as errors since the annotations
target does not depend on `ConsoleRunnerImpl`.  Change the reference to
be a plain code reference to work around this.

 src/java/org/pantsbuild/junit/annotations/TestParallel.java | 2 +-
 src/java/org/pantsbuild/junit/annotations/TestSerial.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Before the fix on my machine:

$ ./build-support/bin/ci.sh
...
16:57:20 00:31   [doc]
16:57:20 00:31     [javadoc]
                   Invalidated 14 targets.OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
src/java/org/pantsbuild/junit/annotations/TestParallel.java:14: error: reference not found
 * {@link org.pantsbuild.tools.junit.impl.ConsoleRunnerImpl}. The {@link TestSerial} annotation
          ^
src/java/org/pantsbuild/junit/annotations/TestSerial.java:14: error: reference not found
 * {@link org.pantsbuild.tools.junit.impl.ConsoleRunnerImpl}. This annotation takes precedence
          ^
2 errors
...

FAILURE: Failed to process javadoc for JavaLibrary(BuildFileAddress(FilesystemBuildFile(/home/jsirois/dev/3rdparty/jsirois-pants/src/java/org/pantsbuild/junit/annotations/BUILD), annotations)) [1]: [u'/usr/lib/jvm/java-8-openjdk/bin/java', '-Xmx1g', '-XX:MaxPermSize=256m', u'-cp', u'../../../../../usr/lib/jvm/java-8-openjdk/lib/tools.jar', u'com.sun.tools.javadoc.Main', u'-quiet', u'-encoding', u'UTF-8', u'-notimestamp', u'-use', u'-classpath', u'/home/jsirois/dev/3rdparty/jsirois-pants/.pants.d/compile/zinc/src.java.org.pantsbuild.junit.annotations.annotations/b1143663f206/z.jar', u'-d', u'/home/jsirois/dev/3rdparty/jsirois-pants/.pants.d/doc/javadoc/src.java.org.pantsbuild.junit.annotations.annotations', u'-linkoffline', u'http://download.oracle.com/javase/6/docs/api/', u'http://download.oracle.com/javase/6/docs/api/', u'src/java/org/pantsbuild/junit/annotations/TestSerial.java', u'src/java/org/pantsbuild/junit/annotations/TestParallel.java']


16:57:25 00:36   [complete]
               FAILURE

After green.

CIs went green here:
https://travis-ci.org/pantsbuild/pants/builds/101486895
http://ec2-54-146-169-50.compute-1.amazonaws.com:8080/job/pants_ci_trigger/65/

John Sirois
John Sirois
John Sirois
Eric Ayers
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit 0d4408a230fb5f7919972c10e2cb33ae4229d359
Author: John Sirois <john.sirois@gmail.com>
Date:   Sun Jan 10 19:53:57 2016 -0700

    Fixup links in `Test{Parallel,Serial}`.
    
    Java 8's javadoc flags these links as errors since the annotations
    target does not depend on `ConsoleRunnerImpl`.  Change the reference to
    be a plain code reference to work around this.
    
    Testing Done:
    Before the fix on my machine:
    ```
    $ ./build-support/bin/ci.sh
    ...
    16:57:20 00:31   [doc]
    16:57:20 00:31     [javadoc]
                       Invalidated 14 targets.OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    src/java/org/pantsbuild/junit/annotations/TestParallel.java:14: error: reference not found
     * {@link org.pantsbuild.tools.junit.impl.ConsoleRunnerImpl}. The {@link TestSerial} annotation
              ^
    src/java/org/pantsbuild/junit/annotations/TestSerial.java:14: error: reference not found
     * {@link org.pantsbuild.tools.junit.impl.ConsoleRunnerImpl}. This annotation takes precedence
              ^
    2 errors
    ...
    
    FAILURE: Failed to process javadoc for JavaLibrary(BuildFileAddress(FilesystemBuildFile(/home/jsirois/dev/3rdparty/jsirois-pants/src/java/org/pantsbuild/junit/annotations/BUILD), annotations)) [1]: [u'/usr/lib/jvm/java-8-openjdk/bin/java', '-Xmx1g', '-XX:MaxPermSize=256m', u'-cp', u'../../../../../usr/lib/jvm/java-8-openjdk/lib/tools.jar', u'com.sun.tools.javadoc.Main', u'-quiet', u'-encoding', u'UTF-8', u'-notimestamp', u'-use', u'-classpath', u'/home/jsirois/dev/3rdparty/jsirois-pants/.pants.d/compile/zinc/src.java.org.pantsbuild.junit.annotations.annotations/b1143663f206/z.jar', u'-d', u'/home/jsirois/dev/3rdparty/jsirois-pants/.pants.d/doc/javadoc/src.java.org.pantsbuild.junit.annotations.annotations', u'-linkoffline', u'http://download.oracle.com/javase/6/docs/api/', u'http://download.oracle.com/javase/6/docs/api/', u'src/java/org/pantsbuild/junit/annotations/TestSerial.java', u'src/java/org/pantsbuild/junit/annotations/TestParallel.java']
    
    16:57:25 00:36   [complete]
                   FAILURE
    ```
    
    After green.
    
    CIs went green here:
      https://travis-ci.org/pantsbuild/pants/builds/101486895
      http://ec2-54-146-169-50.compute-1.amazonaws.com:8080/job/pants_ci_trigger/65/
    
    Bugs closed: 2789
    
    Reviewed at https://rbcommons.com/s/twitter/r/3326/
Qicheng Ma
Ship It!
Loading...