Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions core/src/main/java/hudson/slaves/SlaveComputer.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.annotation.OverridingMethodsMustInvokeSuper;
import javax.servlet.ServletException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -716,7 +715,7 @@ public List<LogRecord> getLogRecords() throws IOException, InterruptedException
}

@RequirePOST
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) throws IOException, ServletException {
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) {
if (channel!=null) {
//does nothing in case computer is already disconnected
checkPermission(DISCONNECT);
Expand All @@ -741,11 +740,18 @@ public void run() {
}

@RequirePOST
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
@Override
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException {
checkPermission(CONNECT);

if(channel!=null) {
req.getView(this,"already-launched.jelly").forward(req, rsp);
try {
req.getView(this, "already-launched.jelly").forward(req, rsp);
} catch (IOException x) {
throw x;
} catch (/*Servlet*/Exception x) {
throw new IOException(x);
}
return;
}

Expand Down Expand Up @@ -778,7 +784,7 @@ public Slave.JnlpJar getJnlpJars(String fileName) {
}

@WebMethod(name="slave-agent.jnlp")
public HttpResponse doSlaveAgentJnlp(StaplerRequest req, StaplerResponse res) throws IOException, ServletException {
public HttpResponse doSlaveAgentJnlp(StaplerRequest req, StaplerResponse res) {
return new EncryptedSlaveAgentJnlpFile(this, "slave-agent.jnlp.jelly", getName(), CONNECT);
}

Expand Down