Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.devtools.build.lib.actions.ActionLookupKey;
import com.google.devtools.build.lib.analysis.config.BuildConfigurationValue;
import com.google.devtools.build.lib.cmdline.Label;
Expand All @@ -44,7 +45,7 @@ private AspectKeyCreator() {}
public static AspectKey createAspectKey(
AspectDescriptor aspectDescriptor, ConfiguredTargetKey baseConfiguredTargetKey) {
return createAspectKey(
aspectDescriptor, /*baseKeys=*/ ImmutableList.of(), baseConfiguredTargetKey);
aspectDescriptor, /* baseKeys= */ ImmutableList.of(), baseConfiguredTargetKey);
}

public static AspectKey createAspectKey(
Expand Down Expand Up @@ -375,7 +376,9 @@ public Label getLabel() {
String getDescription() {
return String.format(
"%s with parameters %s on %s",
topLevelAspectsClasses, topLevelAspectsParameters, targetLabel);
Lists.transform(topLevelAspectsClasses, AspectClass::getName),
topLevelAspectsParameters,
targetLabel);
Comment on lines +379 to +381

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While Lists.transform works, using Java 8 streams would be more consistent with other parts of this file (e.g., lines 252 and 304 which use stream()...collect(toImmutableList())). This would also make the new import of com.google.common.collect.Lists unnecessary.

Suggested change
Lists.transform(topLevelAspectsClasses, AspectClass::getName),
topLevelAspectsParameters,
targetLabel);
topLevelAspectsClasses.stream().map(AspectClass::getName).collect(toImmutableList()),
topLevelAspectsParameters,
targetLabel);

}

@Override
Expand Down