tvalentyn commented on code in PR #38252:
URL: https://github.com/apache/beam/pull/38252#discussion_r3407413939


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcWindmillServer.java:
##########
@@ -110,16 +111,20 @@ private static DataflowWorkerHarnessOptions testOptions(
       boolean enableStreamingEngine, List<String> additionalExperiments) {
     DataflowWorkerHarnessOptions options =
         PipelineOptionsFactory.create().as(DataflowWorkerHarnessOptions.class);
+    // Ensure the experiments list is mutable before any experiments are added.
+    if (options.getExperiments() != null) {
+      options.setExperiments(new ArrayList<>(options.getExperiments()));
+    }
     options.setProject("project");

Review Comment:
   here and in other places: why was this copy necessary? 



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