Skip to content

Commit

Permalink
Fix codesmell in Crosstool.java.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 399688994
  • Loading branch information
MarkDacek authored and copybara-github committed Sep 29, 2021
1 parent 4d4ab50 commit 08f3e93
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/**
Expand Down Expand Up @@ -379,14 +380,15 @@ public String getCcToolchainConfigRule() {
private final String crosstoolTop;
private final Label crosstoolTopLabel;
private String ccToolchainConfigFileContents;
private ImmutableList<String> archs;
private final List<String> archs;
private boolean supportsHeaderParsing;
private ImmutableList<CcToolchainConfig> ccToolchainConfigList = ImmutableList.of();

Crosstool(MockToolsConfig config, String crosstoolTop, Label crosstoolTopLabel) {
this.config = config;
this.crosstoolTop = crosstoolTop;
this.crosstoolTopLabel = crosstoolTopLabel;
this.archs = new ArrayList<>();
}

public Crosstool setCcToolchainFile(String ccToolchainConfigFileContents) {
Expand All @@ -395,7 +397,8 @@ public Crosstool setCcToolchainFile(String ccToolchainConfigFileContents) {
}

public Crosstool setSupportedArchs(ImmutableList<String> archs) {
this.archs = archs;
this.archs.clear();
this.archs.addAll(archs);
return this;
}

Expand Down

0 comments on commit 08f3e93

Please sign in to comment.