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 13b696edd74f3..0daa95794d24c 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 @@ *

Reading

* *

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 static class Import extends Write { ValueProvider fhirStore, ValueProvider 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 653e9a855d683..367aba032db14 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 static class HL7v2MessagePages implements Iterable> { 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 boolean hasNext() throws NoSuchElementException { List msgs = response.getHl7V2Messages(); if (msgs == null) { return false; - } else { - return !msgs.isEmpty(); } + return !msgs.isEmpty(); } catch (IOException e) { throw new NoSuchElementException( String.format(