Skip to content

Commit 2ed80a1

Browse files
authored
Merge pull request #801 from darxriggs/unused-assignments
Remove unused assignments
2 parents efa312e + e7a74a3 commit 2ed80a1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/main/java/hudson/plugins/git/GitSCM.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public class GitSCM extends GitSCMBackwardCompatibility {
144144
private boolean doGenerateSubmoduleConfigurations;
145145

146146
@CheckForNull
147-
public String gitTool = null;
147+
public String gitTool;
148148
@CheckForNull
149149
private GitRepositoryBrowser browser;
150150
private Collection<SubmoduleConfig> submoduleCfg;
@@ -732,7 +732,7 @@ private PollingResult compareRemoteRevisionWithImpl(Job<?, ?> project, Launcher
732732
if (!branchSpec.matches(head, environment)) {
733733

734734
// convert head `refs/(heads|tags|whatever)/branch` into shortcut notation `remote/branch`
735-
String name = head;
735+
String name;
736736
Matcher matcher = GIT_REF.matcher(head);
737737
if (matcher.matches()) name = remote + head.substring(matcher.group(1).length());
738738
else name = remote + "/" + head;

src/main/java/hudson/plugins/git/browser/GitLab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public URL getChangeSetLink(GitChangeSet changeSet) throws IOException {
9898
@Override
9999
public URL getDiffLink(Path path) throws IOException {
100100
final GitChangeSet changeSet = path.getChangeSet();
101-
String filelink = null;
101+
String filelink;
102102
if(getVersionDouble() < 8.0) {
103103
filelink = "#" + path.getPath();
104104
} else

src/main/java/hudson/plugins/git/extensions/impl/CloneOption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class CloneOption extends GitSCMExtension {
3333
private final String reference;
3434
private final Integer timeout;
3535
private Integer depth;
36-
private boolean honorRefspec = false;
36+
private boolean honorRefspec;
3737

3838
public CloneOption(boolean shallow, String reference, Integer timeout) {
3939
this(shallow, false, reference, timeout);

src/main/java/hudson/plugins/git/extensions/impl/SparseCheckoutPaths.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.util.Objects;
2020

2121
public class SparseCheckoutPaths extends GitSCMExtension {
22-
private List<SparseCheckoutPath> sparseCheckoutPaths = Collections.emptyList();
22+
private List<SparseCheckoutPath> sparseCheckoutPaths;
2323

2424
@DataBoundConstructor
2525
public SparseCheckoutPaths(List<SparseCheckoutPath> sparseCheckoutPaths) {

0 commit comments

Comments
 (0)