Skip to content

Commit

Permalink
Remove dead code from TreeArtifactValue.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 328435075
  • Loading branch information
alexjski authored and copybara-github committed Aug 26, 2020
1 parent 8454a18 commit 5150ce1
Showing 1 changed file with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,6 @@ public interface MultiBuilder {
MultiBuilder setArchivedRepresentation(
ArchivedTreeArtifact archivedArtifact, FileArtifactValue metadata);

/**
* Make sure the builder will inject a {@link TreeArtifactValue} for a given {@linkplain
* SpecialArtifact tree artifact}.
*
* <p>Convenience method allowing to construct potentially empty {@link TreeArtifactValue} with
* a {@link MultiBuilder}.
*
* <p>There is no need to call this method before {@link #putChild(TreeFileArtifact,
* FileArtifactValue)} or {@link #setArchivedRepresentation(ArchivedTreeArtifact,
* FileArtifactValue)} since both methods implicitly make sure that the {@link
* TreeArtifactValue} will be created for the related {@linkplain SpecialArtifact parent tree
* artifact}.
*/
MultiBuilder addTreeArtifact(SpecialArtifact treeArtifact);

/**
* For each unique parent seen by this builder, passes the aggregated metadata to {@link
* TreeArtifactInjector#injectTree}.
Expand Down Expand Up @@ -494,14 +479,6 @@ public MultiBuilder setArchivedRepresentation(
return this;
}

@Override
public MultiBuilder addTreeArtifact(SpecialArtifact treeArtifact) {
Preconditions.checkArgument(
treeArtifact.isTreeArtifact(), "Not a tree artifact: %s", treeArtifact);
map.computeIfAbsent(treeArtifact, Builder::new);
return this;
}

@Override
public void injectTo(TreeArtifactInjector treeInjector) {
map.forEach((parent, builder) -> treeInjector.injectTree(parent, builder.build()));
Expand Down Expand Up @@ -537,14 +514,6 @@ public MultiBuilder setArchivedRepresentation(
return this;
}

@Override
public MultiBuilder addTreeArtifact(SpecialArtifact treeArtifact) {
Preconditions.checkArgument(
treeArtifact.isTreeArtifact(), "Not a tree artifact: %s", treeArtifact);
children.computeIfAbsent(treeArtifact, ignored -> new ConcurrentHashMap<>());
return null;
}

@Override
public void injectTo(TreeArtifactInjector treeInjector) {
children.forEach(
Expand Down

0 comments on commit 5150ce1

Please sign in to comment.