Abacn commented on code in PR #39708:
URL: https://github.com/apache/beam/pull/39708#discussion_r3768023796


##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java:
##########
@@ -1592,7 +1592,9 @@ public DataflowPipelineJob run(Pipeline pipeline) {
       String fileLocation =
           firstNonNull(options.getTemplateLocation(), 
options.getDataflowJobFile());
       checkArgument(
-          fileLocation.startsWith("/") || fileLocation.startsWith("gs://"),
+          fileLocation.startsWith("/")

Review Comment:
   Minor performance consideration. Considering the ordering:
   
   `fileLocation.startsWith("/") || fileLocation.startsWith("gs://") || new 
File(fileLocation).isAbsolute()`
   
   Nowadays most likely it would be a gcs path. Put `new` the last one avoids 
new an object each time it's executed



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