You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/09/16 14:39:48 UTC

[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #1624: [Improve] Replace the assert with checkState

wolfboys commented on code in PR #1624:
URL: https://github.com/apache/incubator-streampark/pull/1624#discussion_r973097495


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/runner/EnvInitializer.java:
##########
@@ -96,7 +97,7 @@ private void initInternalConfig(Environment springEnv) {
             .filter(springEnv::containsProperty)
             .forEach(key -> {
                 InternalOption config = InternalConfigHolder.getConfig(key);
-                assert config != null;
+                Preconditions.checkState(config != null);

Review Comment:
   use `AssertUtils.state(...)` replace `Preconditions.checkState`, We should try to avoid use flink methods in the streampark-console, because streampark-console need to support multiple versions of flink, It is easy to cause conflicts when use flink methods
   



-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org