Skip to content

Commit

Permalink
Merge pull request #134 from basil/deprecated
Browse files Browse the repository at this point in the history
Remove usages of deprecated APIs
  • Loading branch information
dwnusbaum authored Aug 2, 2019
2 parents 7f87216 + 3e78268 commit 1ffc475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package org.jenkinsci.plugins.workflow.job.views;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import hudson.model.Action;
import hudson.util.HttpResponses;
Expand Down Expand Up @@ -76,7 +77,7 @@ public HttpResponse doDot() throws IOException {
return HttpResponses.plainText(sw.toString());
}

@edu.umd.cs.findbugs.annotations.SuppressWarnings("DM_DEFAULT_ENCODING")
@SuppressFBWarnings("DM_DEFAULT_ENCODING")
public void doIndex(StaplerResponse rsp) throws IOException {
Process p = new ProcessBuilder("dot", "-Tpng").start();
writeDot(new PrintWriter(p.getOutputStream()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,10 @@ private void assertCulprits(WorkflowRun b, String... expectedIds) throws IOExcep
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("", true));
// Control case:
QueueItemAuthenticatorConfiguration.get().getAuthenticators().add(new MockQueueItemAuthenticator(Collections.singletonMap("p", User.get("admin").impersonate())));
QueueItemAuthenticatorConfiguration.get().getAuthenticators().add(new MockQueueItemAuthenticator(Collections.singletonMap("p", User.getById("admin", true).impersonate())));
r.buildAndAssertSuccess(p);
// Test case: build is never scheduled, queue item hangs with “Waiting for next available executor on master”
QueueItemAuthenticatorConfiguration.get().getAuthenticators().replace(new MockQueueItemAuthenticator(Collections.singletonMap("p", User.get("dev").impersonate())));
QueueItemAuthenticatorConfiguration.get().getAuthenticators().replace(new MockQueueItemAuthenticator(Collections.singletonMap("p", User.getById("dev", true).impersonate())));
r.buildAndAssertSuccess(p);
}

Expand Down

0 comments on commit 1ffc475

Please sign in to comment.