diff options
author | laurentlb <laurentlb@google.com> | 2017-06-30 00:32:04 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-06-30 13:00:58 +0200 |
commit | 3d2a68c6da2a50a9e1bcf6615e83a43701cdf95d (patch) | |
tree | 31692a985d316e33733ab6993e529b8a08c206b6 /src/main/java/com/google/devtools/build/lib/analysis/platform | |
parent | 2d5eeab381713f99c8c8b7b80f3d447be847b548 (diff) |
Automated conversion to Java 8
With a few manual fixes for readability.
RELNOTES: None.
PiperOrigin-RevId: 160582556
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/platform')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformProviderUtils.java | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformProviderUtils.java b/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformProviderUtils.java index 7a5d06d969..73664f7b04 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformProviderUtils.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformProviderUtils.java @@ -14,7 +14,6 @@ package com.google.devtools.build.lib.analysis.platform; -import com.google.common.base.Function; import com.google.common.collect.Iterables; import com.google.devtools.build.lib.analysis.SkylarkProviderCollection; import com.google.devtools.build.lib.util.Preconditions; @@ -35,14 +34,7 @@ public class PlatformProviderUtils { /** Retrieves and casts {@link PlatformInfo} providers from the given targets. */ public static Iterable<PlatformInfo> platforms( Iterable<? extends SkylarkProviderCollection> targets) { - return Iterables.transform( - targets, - new Function<SkylarkProviderCollection, PlatformInfo>() { - @Override - public PlatformInfo apply(SkylarkProviderCollection target) { - return platform(target); - } - }); + return Iterables.transform(targets, PlatformProviderUtils::platform); } /** Retrieves and casts the {@link ConstraintSettingInfo} provider from the given target. */ @@ -58,14 +50,7 @@ public class PlatformProviderUtils { /** Retrieves and casts {@link ConstraintSettingInfo} providers from the given targets. */ public static Iterable<ConstraintSettingInfo> constraintSettings( Iterable<? extends SkylarkProviderCollection> targets) { - return Iterables.transform( - targets, - new Function<SkylarkProviderCollection, ConstraintSettingInfo>() { - @Override - public ConstraintSettingInfo apply(SkylarkProviderCollection target) { - return constraintSetting(target); - } - }); + return Iterables.transform(targets, PlatformProviderUtils::constraintSetting); } /** Retrieves and casts the {@link ConstraintValueInfo} provider from the given target. */ @@ -81,13 +66,6 @@ public class PlatformProviderUtils { /** Retrieves and casts {@link ConstraintValueInfo} providers from the given targets. */ public static Iterable<ConstraintValueInfo> constraintValues( Iterable<? extends SkylarkProviderCollection> targets) { - return Iterables.transform( - targets, - new Function<SkylarkProviderCollection, ConstraintValueInfo>() { - @Override - public ConstraintValueInfo apply(SkylarkProviderCollection target) { - return constraintValue(target); - } - }); + return Iterables.transform(targets, PlatformProviderUtils::constraintValue); } } |