diff options
author | 2017-06-30 00:32:04 +0200 | |
---|---|---|
committer | 2017-06-30 13:00:58 +0200 | |
commit | 3d2a68c6da2a50a9e1bcf6615e83a43701cdf95d (patch) | |
tree | 31692a985d316e33733ab6993e529b8a08c206b6 /src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java | |
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/rules/python/PythonRunfilesProvider.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java index 76d55573cf..8c6f110d83 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java @@ -37,17 +37,12 @@ public final class PythonRunfilesProvider implements TransitiveInfoProvider { } /** - * Returns a function that gets the Python runfiles from a {@link TransitiveInfoCollection} or - * the empty runfiles instance if it does not contain that provider. + * Returns a function that gets the Python runfiles from a {@link TransitiveInfoCollection} or the + * empty runfiles instance if it does not contain that provider. */ public static final Function<TransitiveInfoCollection, Runfiles> TO_RUNFILES = - new Function<TransitiveInfoCollection, Runfiles>() { - @Override - public Runfiles apply(TransitiveInfoCollection input) { - PythonRunfilesProvider provider = input.getProvider(PythonRunfilesProvider.class); - return provider == null - ? Runfiles.EMPTY - : provider.getPythonRunfiles(); - } + input -> { + PythonRunfilesProvider provider = input.getProvider(PythonRunfilesProvider.class); + return provider == null ? Runfiles.EMPTY : provider.getPythonRunfiles(); }; } |