Skip to content

Commit

Permalink
[JENKINS-36871] Make all the rest of the javadoc work on Java 8's str…
Browse files Browse the repository at this point in the history
…ict validation
  • Loading branch information
stephenc committed Aug 3, 2016
1 parent fc646c3 commit aae74ae
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/main/java/hudson/remoting/Asynchronous.java
Expand Up @@ -31,7 +31,7 @@
* // this method actually gets executed. For example, if you invoke two async
* // calls, they may execute in the reverse order.
* foo.zot();
*
* </pre>
*
* @see Channel#callAsync(Callable)
* @author Kohsuke Kawaguchi
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/hudson/remoting/Base64.java
Expand Up @@ -27,8 +27,6 @@
* data. You need the data that you will encode/decode
* already on a byte arrray.
*
* @xerces.internal
*
* @author Jeffrey Rodriguez
* @author Sandy Gao
* @version $Id: Base64.java,v 1.4 2007/07/19 04:38:32 ofung Exp $
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/hudson/remoting/CallableFilter.java
@@ -1,5 +1,7 @@
package hudson.remoting;

import org.jenkinsci.remoting.CallableDecorator;

/**
* Decorator on {@code Callable.call()} to filter the execution.
*
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/hudson/remoting/Channel.java
Expand Up @@ -643,8 +643,6 @@ public <T> T export(Class<T> type, T instance) {

/**
* Increase reference count so much to effectively prevent de-allocation.
*
* @see ExportTable.Entry#pin()
*/
public void pin(Object instance) {
exportedObjects.pin(instance);
Expand Down Expand Up @@ -1065,8 +1063,8 @@ public synchronized void join(long timeout) throws InterruptedException {
/**
* Notifies the remote peer that we are closing down.
*
* Execution of this command also triggers the {@link SynchronousCommandTransport.ReaderThread} to shut down
* and quit. The {@link CloseCommand} is always the last command to be sent on
* Execution of this command also triggers the {@code SynchronousCommandTransport.ReaderThread} to shut down
* and quit. The {@code CloseCommand} is always the last command to be sent on
* {@link ObjectOutputStream}, and it's the last command to be read.
*/
private static final class CloseCommand extends Command {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/remoting/ClassFilter.java
Expand Up @@ -23,7 +23,7 @@
*/
public abstract class ClassFilter {
/**
* Property to set to <b>override<b> the blacklist used by {{@link #DEFAULT} with a different set.
* Property to set to <b>override</b> the blacklist used by {{@link #DEFAULT} with a different set.
* The location should point to a a file containing regular expressions (one per line) of classes to blacklist.
* If this property is set but the file can not be read the default blacklist will be used.
* @since 2.53.2
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/remoting/CommandTransport.java
Expand Up @@ -108,7 +108,7 @@ static interface CommandReceiver {
*
* <h2>Closing the read pump</h2>
* <p>
* {@link Channel} implements {@linkplain Channel.CloseCommand its own "end of command stream" marker}, and
* {@link Channel} implements {@code Channel.CloseCommand} its own "end of command stream" marker, and
* therefore under the orderly shutdown scenario, it doesn't rely on the transport to provide EOF-like
* marker. Instead, {@link Channel} will call your {@link #closeRead()} (from the same thread
* that invoked {@link CommandReceiver#handle(Command)}) to indicate that it is done with the reading.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/remoting/FastPipedInputStream.java
Expand Up @@ -32,7 +32,7 @@
* synchronization with its counterpart {@link FastPipedOutputStream}.
*
* @author WD
* @link http://developer.java.sun.com/developer/bugParade/bugs/4404700.html
* @see <a href="http://developer.java.sun.com/developer/bugParade/bugs/4404700.html">4404700</a>
* @see FastPipedOutputStream
*/
public class FastPipedInputStream extends InputStream {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/remoting/FastPipedOutputStream.java
Expand Up @@ -33,7 +33,7 @@
* synchronization with its counterpart {@link FastPipedInputStream}.
*
* @author WD
* @link http://developer.java.sun.com/developer/bugParade/bugs/4404700.html
* @see <a href="http://developer.java.sun.com/developer/bugParade/bugs/4404700.html">4404700</a>
* @see FastPipedOutputStream
*/
public class FastPipedOutputStream extends OutputStream implements ErrorPropagatingOutputStream {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/remoting/RemoteClassLoader.java
Expand Up @@ -582,7 +582,7 @@ public static class ClassFile2 extends ResourceFile {
*
* This information is crucial in determining which classloaders are to cache
* the prefetch information. Imagine classloader X requests fetch3("Foo"),
* which returns 2 <tt>ClassFile2<tt> instances:
* which returns 2 {@code ClassFile2} instances:
*
* <ol>
* <li>ClassFile2 #1: image of "Foo" is here and load this from classloader Y
Expand Down
@@ -1,6 +1,7 @@
package org.jenkinsci.remoting;

import hudson.remoting.Callable;
import hudson.remoting.Channel;

/**
* Decorator on {@code Callable.call()} to filter the execution.
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/jenkinsci/remoting/Role.java
Expand Up @@ -27,17 +27,17 @@
* </pre>
*
* <p>
* Then the callables that are meant to be run on the server would return {@code CLIENT} from
* {@link RoleSensitive#getRecipients()}:
* Then the callables that are meant to be run on the client would check {@code CLIENT} from
* {@link RoleSensitive#checkRoles(RoleChecker)}:
*
* <pre>
* // from the server
* channelToClient.call(new Callable&lt;Void,IOException>() {
* channelToClient.call(new Callable&lt;Void,IOException&gt;() {
* Void call() {
* ...
* }
* Collection&lt;Role> getRecipients() {
* return Collections.singleton(MyProtocol.CLIENT);
* void checkRoles(RoleChecker checker) {
* checker.check(this,MyProtocol.CLIENT);
* }
* });
* </pre>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jenkinsci/remoting/RoleSensitive.java
Expand Up @@ -24,8 +24,8 @@ public interface RoleSensitive {
* If you have a Jenkins {@link Callable} or {@code FileCallable}, use the standard abstract base classes instead,
* such as {@code MasterToSlaveCallable}, {@code MasterToSlaveFileCallable}, {@code NotReallyRoleSensitiveCallable}, etc.
* See <a href="https://wiki.jenkins-ci.org/display/JENKINS/Slave+To+Master+Access+Control/#SlaveToMasterAccessControl-I%27maplugindeveloper.WhatshouldIdo%3F">this document</a> for details.
* @return
* If the method returns normally, the check has passed.
* <p>
* If the method returns normally, the check has passed.
*
* @throws SecurityException
* If there's a mismatch in the expected roles and the actual roles that should prevent
Expand Down
Expand Up @@ -79,6 +79,7 @@
*
* <p>The following goes over the handshake in more detail:
* <pre>
* {@code
* Client Master
* handshake ciphers = createFrom(slave name, slave secret)
*
Expand Down Expand Up @@ -110,7 +111,8 @@
*
* channel ciphers = createFrom(AES key, IvSpec)
* channel = channelBuilder.createWith(channel ciphers)
* </pre>
* }
* </pre>
*
* <p>The entire process assumes the slave secret has not been leaked
* beforehand and the slave obtains it in a secure manner.
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/org/jenkinsci/remoting/util/SettableFuture.java
Expand Up @@ -113,7 +113,7 @@ private SettableFuture() {
* Completes the future with the supplied value.
*
* @param value the value (may be {@code null}.
* @return {@code true} if the future is now completed, {@false} if the future has already been completed.
* @return {@code true} if the future is now completed, {@code false} if the future has already been completed.
*/
public boolean set(@Nullable V value) {
boolean result;
Expand All @@ -137,7 +137,7 @@ public boolean set(@Nullable V value) {
* Completes the future with the supplied exception.
*
* @param throwable the exception.
* @return {@code true} if the future is now completed, {@false} if the future has already been completed.
* @return {@code true} if the future is now completed, {@code false} if the future has already been completed.
*/
public boolean setException(@Nonnull Throwable throwable) {
verifyNonnull(throwable);
Expand Down Expand Up @@ -165,7 +165,7 @@ public boolean setException(@Nonnull Throwable throwable) {
* Completes the future by cancellation.
*
* @param mayInterruptIfRunning ignored.
* @return {@code true} if the future is now cancelled, {@false} if the future has already been completed.
* @return {@code true} if the future is now cancelled, {@code false} if the future has already been completed.
*/
@Override
public boolean cancel(boolean mayInterruptIfRunning) {
Expand Down Expand Up @@ -229,7 +229,8 @@ public V get() throws InterruptedException, ExecutionException {
* {@inheritDoc}
*/
@Override
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
public V get(long timeout, @Nonnull TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
long timeoutNanos = unit.toNanos(timeout);
long start = System.nanoTime();
synchronized (lock) {
Expand Down

0 comments on commit aae74ae

Please sign in to comment.