tillrohrmann commented on a change in pull request #8175: [FLINK-9787]Change 
ExecutionConfig#getGlobalJobParameters to return a…
URL: https://github.com/apache/flink/pull/8175#discussion_r318492471
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
 ##########
 @@ -741,6 +741,9 @@ public boolean isSysoutLoggingEnabled() {
        }
 
        public GlobalJobParameters getGlobalJobParameters() {
+               if (globalJobParameters == null) {
+                       globalJobParameters = new GlobalJobParameters();
 
 Review comment:
   Wouldn't it be better to initialize `globalJobParameters` in the constructor 
of the `ExecutionConfig` and then introduce a not null check in the 
`setGlobalJobParameters` method? That way, our invariant would be that this 
field is never `null`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to