提交 9675c14c 编写于 作者: J Jesse Glick

Additional Javadoc explaining why RunnerStack.peek might return null.

上级 ca2b0d69
......@@ -53,6 +53,8 @@ import javax.annotation.Nonnull;
* This class defines a few well-known check point instances. plugins can define
* their additional check points for their own use.
*
* <p>Note that not all job types support checkpoints.
*
* <h2>Example</h2>
* <p>
* {@link JUnitResultArchiver} provides a good example of how a {@link Recorder} can
......
......@@ -56,6 +56,10 @@ final class RunnerStack {
/**
* Looks up the currently running build, if known.
* <p>While most {@link Run} implementations do add a {@link RunExecution} to the stack for the duration of the build,
* those which have a different implementation of {@link Run#run} (or which do additional work after {@link Run#execute} completes)
* may not consistently or ever keep an execution on the stack.
* In such cases this method will return null, meaning that {@link CheckPoint#block(BuildListener, String)} and {@link CheckPoint#report} will do nothing.
* @return a running build, or null if one has not been recorded
*/
synchronized @CheckForNull RunExecution peek() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册