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

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

commit 3ecf13b9fc889f1978efef57f14f610766242901
Author: Eugene Kirpichov <kirpic...@google.com>
AuthorDate: Fri Nov 17 15:41:20 2017 -0800

    Makes checkstyle and findbugs happy
---
 .../java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java | 2 +-
 .../core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java  | 2 +-
 .../core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java     | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java
 
b/runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java
index 3467d53..edf513b 100644
--- 
a/runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java
+++ 
b/runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java
@@ -1344,7 +1344,7 @@ public class DataflowRunnerTest implements Serializable {
         (WriteFiles<Object, Void, Object>)
             
factory.getReplacementTransform(originalApplication).getTransform();
     assertThat(replacement, not(equalTo((Object) original)));
-    assertThat(replacement.getNumShards().get(), equalTo(expectedNumShards));
+    assertThat(replacement.getNumShardsProvider().get(), 
equalTo(expectedNumShards));
   }
 
   private static class TestSink extends FileBasedSink<Object, Void, Object> {
diff --git 
a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java 
b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java
index 20d2a27..12c4555 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java
@@ -874,7 +874,7 @@ public abstract class FileBasedSink<UserT, DestinationT, 
OutputT>
     /** Unique id for this output bundle. */
     private @Nullable String id;
 
-    private DestinationT destination;
+    private @Nullable DestinationT destination;
 
     /** The output file for this bundle. May be null if opening failed. */
     private @Nullable ResourceId outputFile;
diff --git 
a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java 
b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
index d6c5788..7e04332 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
@@ -170,10 +170,10 @@ public abstract class WriteFiles<UserT, DestinationT, 
OutputT>
         FileBasedSink<UserT, DestinationT, OutputT> sink);
 
     abstract Builder<UserT, DestinationT, OutputT> setComputeNumShards(
-        PTransform<PCollection<UserT>, PCollectionView<Integer>> 
computeNumShards);
+        @Nullable PTransform<PCollection<UserT>, PCollectionView<Integer>> 
computeNumShards);
 
     abstract Builder<UserT, DestinationT, OutputT> setNumShardsProvider(
-        ValueProvider<Integer> numShardsProvider);
+        @Nullable ValueProvider<Integer> numShardsProvider);
 
     abstract Builder<UserT, DestinationT, OutputT> setWindowedWrites(boolean 
windowedWrites);
 
@@ -604,12 +604,12 @@ public abstract class WriteFiles<UserT, DestinationT, 
OutputT>
       extends PTransform<PCollection<UserT>, 
PCollection<FileResult<DestinationT>>> {
     private final Coder<DestinationT> destinationCoder;
     private final Coder<FileResult<DestinationT>> fileResultCoder;
-    private final PCollectionView<Integer> numShardsView;
+    private final @Nullable PCollectionView<Integer> numShardsView;
 
     private WriteShardedBundlesToTempFiles(
         Coder<DestinationT> destinationCoder,
         Coder<FileResult<DestinationT>> fileResultCoder,
-        PCollectionView<Integer> numShardsView) {
+        @Nullable PCollectionView<Integer> numShardsView) {
       this.destinationCoder = destinationCoder;
       this.fileResultCoder = fileResultCoder;
       this.numShardsView = numShardsView;

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

Reply via email to