mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
Use CheckForNull
This commit is contained in:
1 parent
0ba90615c7
commit
cbfd63d375
1 file changed
+2
-2
@@ -28,7 +28,7 @@ import org.kohsuke.stapler.HttpResponse;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.CheckForNull;
|
||||
import javax.servlet.ServletException;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Failure extends RuntimeException implements HttpResponse {
|
||||
this.pre = pre;
|
||||
}
|
||||
|
||||
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node, @Nullable Throwable throwable) throws IOException, ServletException {
|
||||
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node, @CheckForNull Throwable throwable) throws IOException, ServletException {
|
||||
if (throwable != null) {
|
||||
req.setAttribute("exception", throwable);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user