Skip to content

Commit

Permalink
[JENKINS-53279] Remove deprecated reference
Browse files Browse the repository at this point in the history
This fixes an issue reporting missing ServletException on agent side, as
MasterComputer is pulling it, but FilePath isn't.
  • Loading branch information
Vlatombe committed Aug 28, 2018
1 parent 414e3fc commit 4977704
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.jenkinsci.plugins.gitclient;

import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import hudson.FilePath;
import hudson.ProxyConfiguration;
import hudson.plugins.git.GitException;
import hudson.remoting.Channel;
import jenkins.model.Jenkins.MasterComputer;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
Expand All @@ -26,7 +26,7 @@ abstract class AbstractGitAPIImpl implements GitClient, Serializable {
/** {@inheritDoc} */
public <T> T withRepository(RepositoryCallback<T> callable) throws IOException, InterruptedException {
try (Repository repo = getRepository()) {
return callable.invoke(repo, MasterComputer.localChannel);
return callable.invoke(repo, FilePath.localChannel);
}
}

Expand Down

0 comments on commit 4977704

Please sign in to comment.