clairemcginty commented on code in PR #36809:
URL: https://github.com/apache/beam/pull/36809#discussion_r2539211190


##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java:
##########
@@ -266,4 +267,30 @@ public String create(PipelineOptions options) {
   List<String> getJdkAddOpenModules();
 
   void setJdkAddOpenModules(List<String> options);
+
+  class AvroSerializableClassesFactory implements 
DefaultValueFactory<List<String>> {

Review Comment:
   thanks for checking! updated it to just:
   
   ```go
   if serializableClasses, ok := 
pipelineOptions.GetStructValue().GetFields()["avroSerializableClasses"]; ok {
        for _, cls := range serializableClasses.GetListValue().GetValues() {
                if cls.GetStringValue() != "" {
                        serializableClassesList = 
append(serializableClassesList, cls.GetStringValue())
                }
        }
   }
   ```
   
   I did some googling/compared the rest of the Go code style in the Beam 
project and it seems that `str != ""` is the canonical way to check for an 
empty string 🤔 



-- 
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