1717import hudson .FilePath ;
1818import hudson .Launcher ;
1919import hudson .init .Initializer ;
20- import hudson .matrix .MatrixBuild ;
21- import hudson .matrix .MatrixRun ;
2220import hudson .model .AbstractBuild ;
2321import hudson .model .AbstractProject ;
2422import hudson .model .Descriptor .FormException ;
3129import hudson .model .TaskListener ;
3230import hudson .model .queue .Tasks ;
3331import hudson .plugins .git .browser .GitRepositoryBrowser ;
34- import hudson .plugins .git .extensions .GitClientConflictException ;
35- import hudson .plugins .git .extensions .GitClientType ;
3632import hudson .plugins .git .extensions .GitSCMExtension ;
3733import hudson .plugins .git .extensions .GitSCMExtensionDescriptor ;
3834import hudson .plugins .git .extensions .impl .AuthorInChangelog ;
7773import org .jenkinsci .plugins .gitclient .FetchCommand ;
7874import org .jenkinsci .plugins .gitclient .Git ;
7975import org .jenkinsci .plugins .gitclient .GitClient ;
80- import org .jenkinsci .plugins .gitclient .JGitTool ;
8176import org .kohsuke .stapler .DataBoundConstructor ;
82- import org .kohsuke .stapler .Stapler ;
8377import org .kohsuke .stapler .StaplerRequest ;
8478import org .kohsuke .stapler .export .Exported ;
8579
121115import static org .apache .commons .collections .CollectionUtils .isEmpty ;
122116import static org .apache .commons .lang .StringUtils .isBlank ;
123117
124- import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
125118
126119/**
127120 * Git SCM.
@@ -698,7 +691,7 @@ private PollingResult compareRemoteRevisionWithImpl(Job<?, ?> project, Launcher
698691
699692 final EnvVars environment = project instanceof AbstractProject ? GitUtils .getPollEnvironment ((AbstractProject ) project , workspace , launcher , listener , false ) : new EnvVars ();
700693
701- GitClient git = createClient (listener , environment , project , Jenkins .getInstance (), null );
694+ GitClient git = createClient (listener , environment , project , Jenkins .get (), null );
702695
703696 for (RemoteConfig remoteConfig : getParamExpandedRepos (lastBuild , listener )) {
704697 String remote = remoteConfig .getName ();
@@ -1433,7 +1426,7 @@ public ChangeLogParser createChangeLogParser() {
14331426 } catch (IOException | InterruptedException e ) {
14341427 LOGGER .log (Level .WARNING , "Git client using '" + gitTool + "' changelog parser failed, using deprecated changelog parser" , e );
14351428 }
1436- return new GitChangeLogParser (getExtensions ().get (AuthorInChangelog .class ) != null );
1429+ return new GitChangeLogParser (null , getExtensions ().get (AuthorInChangelog .class ) != null );
14371430 }
14381431
14391432 @ Extension
@@ -1474,7 +1467,7 @@ public List<GitSCMExtensionDescriptor> getExtensionDescriptors() {
14741467
14751468 @ SuppressFBWarnings (value ="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" , justification ="Jenkins.getInstance() is not null" )
14761469 public boolean showGitToolOptions () {
1477- return Jenkins .getInstance ().getDescriptorByType (GitTool .DescriptorImpl .class ).getInstallations ().length >1 ;
1470+ return Jenkins .get ().getDescriptorByType (GitTool .DescriptorImpl .class ).getInstallations ().length >1 ;
14781471 }
14791472
14801473 /**
@@ -1483,7 +1476,7 @@ public boolean showGitToolOptions() {
14831476 */
14841477 @ SuppressFBWarnings (value ="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" , justification ="Jenkins.getInstance() is not null" )
14851478 public List <GitTool > getGitTools () {
1486- GitTool [] gitToolInstallations = Jenkins .getInstance ().getDescriptorByType (GitTool .DescriptorImpl .class ).getInstallations ();
1479+ GitTool [] gitToolInstallations = Jenkins .get ().getDescriptorByType (GitTool .DescriptorImpl .class ).getInstallations ();
14871480 return Arrays .asList (gitToolInstallations );
14881481 }
14891482
@@ -1876,7 +1869,7 @@ private boolean isRevExcluded(GitClient git, Revision r, TaskListener listener,
18761869 justification = "Tests use null instance, Jenkins 2.60 declares instance is not null" )
18771870 @ Initializer (after =PLUGINS_STARTED )
18781871 public static void onLoaded () {
1879- Jenkins jenkins = Jenkins .getInstance ();
1872+ Jenkins jenkins = Jenkins .get ();
18801873 DescriptorImpl desc = jenkins .getDescriptorByType (DescriptorImpl .class );
18811874
18821875 if (desc .getOldGitExe () != null ) {
0 commit comments