MaxonT commented on code in PR #41760:
URL: https://github.com/apache/beam/pull/41760#discussion_r4743095414


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2MessageCoder.java:
##########
@@ -42,6 +45,7 @@ public static HL7v2MessageCoder of(Class<HL7v2Message> clazz) 
{
   private static final NullableCoder<String> STRING_CODER = 
NullableCoder.of(StringUtf8Coder.of());
   private static final NullableCoder<Map<String, String>> MAP_CODER =
       NullableCoder.of(MapCoder.of(STRING_CODER, STRING_CODER));
+  private static final JsonFactory JSON_FACTORY = new GsonFactory();

Review Comment:
   Thanks, that's simpler. `JSON_FACTORY` now uses 
`GsonFactory.getDefaultInstance()` instead of `new GsonFactory()` in 8394c926, 
so the coder shares the library's singleton. `getDefaultInstance()` exists in 
google-http-client-gson 1.41.2, the version the module pins. After the change, 
spotlessJavaCheck passes locally and `HL7v2MessageCoderTest` passes 5 of 5. 
Upstream CI hasn't finished on this head. The wire-format break is documented 
under "Upgrade compatibility" in `CHANGES.md`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to