You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2020/06/04 20:33:53 UTC

[beam] branch master updated: Minor formatting updates.

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

pabloem 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 7429059  Minor formatting updates.
     new 095589c  Merge pull request #11920 from lastomato/master - Minor formatting updates.
7429059 is described below

commit 74290599f0c430e6d4506e3f7b371c3a7e321577
Author: Jie Fan <la...@google.com>
AuthorDate: Thu Jun 4 11:29:28 2020 -0400

    Minor formatting updates.
    
    - Chain constructors instead of assigning directly;
    - Typo fixes.
---
 .../java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java     | 10 ++--------
 .../beam/sdk/io/gcp/healthcare/HttpHealthcareApiClient.java    | 10 ++--------
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java
index 13b696e..0daa957 100644
--- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java
+++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java
@@ -90,7 +90,7 @@ import org.slf4j.LoggerFactory;
  * <h3>Reading</h3>
  *
  * <p>FHIR resources can be read with {@link FhirIO.Read}, which supports use cases where you have a
- * ${@link PCollection} of message IDS. This is appropriate for reading the Fhir notifications from
+ * ${@link PCollection} of message IDs. This is appropriate for reading the Fhir notifications from
  * a Pub/Sub subscription with {@link PubsubIO#readStrings()} or in cases where you have a manually
  * prepared list of messages that you need to process (e.g. in a text file read with {@link
  * org.apache.beam.sdk.io.TextIO}*) .
@@ -741,13 +741,7 @@ public class FhirIO {
         ValueProvider<String> fhirStore,
         ValueProvider<String> deadLetterGcsPath,
         @Nullable ContentStructure contentStructure) {
-      this.fhirStore = fhirStore;
-      this.deadLetterGcsPath = deadLetterGcsPath;
-      if (contentStructure == null) {
-        this.contentStructure = ContentStructure.CONTENT_STRUCTURE_UNSPECIFIED;
-      } else {
-        this.contentStructure = contentStructure;
-      }
+      this(fhirStore, null, deadLetterGcsPath, contentStructure);
     }
     /**
      * Instantiates a new Import.
diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HttpHealthcareApiClient.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HttpHealthcareApiClient.java
index 653e9a8..367aba0 100644
--- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HttpHealthcareApiClient.java
+++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HttpHealthcareApiClient.java
@@ -548,12 +548,7 @@ public class HttpHealthcareApiClient implements HealthcareApiClient, Serializabl
         String hl7v2Store,
         @Nullable Instant start,
         @Nullable Instant end) {
-      this.client = client;
-      this.hl7v2Store = hl7v2Store;
-      this.filter = null;
-      this.orderBy = null;
-      this.start = start;
-      this.end = end;
+      this(client, hl7v2Store, start, end, null, null);
     }
 
     /**
@@ -660,9 +655,8 @@ public class HttpHealthcareApiClient implements HealthcareApiClient, Serializabl
             List<Message> msgs = response.getHl7V2Messages();
             if (msgs == null) {
               return false;
-            } else {
-              return !msgs.isEmpty();
             }
+            return !msgs.isEmpty();
           } catch (IOException e) {
             throw new NoSuchElementException(
                 String.format(