fuweng11 commented on code in PR #9865:
URL: https://github.com/apache/inlong/pull/9865#discussion_r1535012911
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/util/StreamParseUtils.java:
##########
@@ -154,4 +159,22 @@ public static StreamPipeline parseStreamPipeline(String
tempView, String inlongS
return GSON.fromJson(tempView, StreamPipeline.class);
}
+ public static String getStreamExtProperty(String key, InlongStreamInfo
streamInfo) {
+ if (StringUtils.isEmpty(key)
+ || streamInfo == null || streamInfo.getExtList() == null ||
streamInfo.getExtList().isEmpty()) {
+ return null;
+ }
+ for (InlongStreamExtInfo ext : streamInfo.getExtList()) {
+ if (key.equalsIgnoreCase(ext.getKeyName())) {
+ return ext.getKeyValue();
+ }
+ }
+ return null;
Review Comment:
```suggestion
if (StringUtils.isNotBlank(key)
&& streamInfo != null &&
CollectionUtils.isNotEmpty(streamInfo.getExtList())) {
for (InlongStreamExtInfo ext : streamInfo.getExtList()) {
if (key.equalsIgnoreCase(ext.getKeyName())) {
return ext.getKeyValue();
}
}
return 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]