healchow commented on code in PR #7233:
URL: https://github.com/apache/inlong/pull/7233#discussion_r1070781905


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AuditServiceImpl.java:
##########
@@ -240,40 +245,38 @@ public List<AuditVO> listByCondition(AuditRequest 
request) throws Exception {
     }
 
     private List<String> getAuditIds(String groupId, String streamId, String 
sinkNodeType) {
-        List<String> auditIds = 
LoginUserUtils.getLoginUser().getRoles().contains(UserRoleCode.ADMIN)
-                ? new ArrayList<>(auditIdListForAdmin)
-                : new ArrayList<>(auditIdListForUser);
+        Set<String> auditSet = 
LoginUserUtils.getLoginUser().getRoles().contains(UserRoleCode.ADMIN)
+                ? new HashSet<>(auditIdListForAdmin)
+                : new HashSet<>(auditIdListForUser);
+
+        Object fixedObj = new Object();
+        Map<String, Object> auditIdMap = 
auditSet.stream().collect(Collectors.toMap(x -> x, x -> fixedObj));

Review Comment:
   OK, the key here is just an immutable string, so we can directly use the add 
method of the Set.



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