You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2018/01/02 19:46:11 UTC

[beam] branch master updated: Fix typechecking for FluentIterable use.

This is an automated email from the ASF dual-hosted git repository.

lcwik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new be3c4a6  Fix typechecking for FluentIterable use.
be3c4a6 is described below

commit be3c4a688ab6879e3d140aa656fd30217117cdf0
Author: Bill Neubauer <wc...@google.com>
AuthorDate: Mon Jan 1 22:38:25 2018 -0800

    Fix typechecking for FluentIterable use.
    
    When compiled with strict typechecking, these usages of FI.of()
    trigger compilation errors. Switching to FI.from() gets the correct
    types.
---
 .../java/org/apache/beam/sdk/options/PipelineOptionsFactory.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java
index f75daee..1f7d8dd 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java
@@ -1097,7 +1097,7 @@ public class PipelineOptionsFactory {
             @Nonnull
             @Override
             public Iterable<? extends Annotation> apply(@Nonnull Method method) {
-              return FluentIterable.of(method.getAnnotations());
+              return FluentIterable.from(method.getAnnotations());
             }
           })
           .filter(annotationPredicates.forAnnotation));
@@ -1112,7 +1112,7 @@ public class PipelineOptionsFactory {
                   @Nonnull
                   @Override
                   public Iterable<String> apply(final @Nonnull Method method) {
-                    return FluentIterable.of(method.getAnnotations())
+                    return FluentIterable.from(method.getAnnotations())
                         .filter(annotationPredicates.forAnnotation)
                         .transform(new Function<Annotation, String>() {
                           @Nonnull
@@ -1483,7 +1483,7 @@ public class PipelineOptionsFactory {
           }});
 
     private static final Set<Class<?>> DEFAULT_ANNOTATION_CLASSES = Sets.newHashSet(
-        FluentIterable.of(Default.class.getDeclaredClasses())
+        FluentIterable.from(Default.class.getDeclaredClasses())
         .filter(new Predicate<Class<?>>() {
           @Override
           public boolean apply(@Nonnull Class<?> klass) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@beam.apache.org" <co...@beam.apache.org>'].