提交 994fd9ff 编写于 作者: O Oleg Nenashev 提交者: GitHub

Annotate and document the AsynchronousExecution#getExecutor() method (#2447)

上级 0b517705
......@@ -32,6 +32,7 @@ import hudson.model.ResourceActivity;
import hudson.model.ResourceController;
import hudson.model.ResourceList;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.GuardedBy;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
......@@ -93,13 +94,16 @@ public abstract class AsynchronousExecution extends RuntimeException {
/**
* Obtains the associated executor.
* @return Associated Executor. May be {@code null} if {@link #setExecutor(hudson.model.Executor)}
* has not been called yet.
*/
@CheckForNull
public synchronized final Executor getExecutor() {
return executor;
}
@Restricted(NoExternalUse.class)
public synchronized final void setExecutor(Executor executor) {
public synchronized final void setExecutor(@Nonnull Executor executor) {
assert this.executor==null;
this.executor = executor;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册