You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/09/13 05:24:16 UTC

[GitHub] [dolphinscheduler] DittoTool commented on a change in pull request #6187: Inefficient Usages of Java Collections

DittoTool commented on a change in pull request #6187:
URL: https://github.com/apache/dolphinscheduler/pull/6187#discussion_r707013028



##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/aspect/AccessLogAspect.java
##########
@@ -99,11 +101,11 @@ private String parseArgs(ProceedingJoinPoint proceedingJoinPoint, AccessLogAnnot
         if (annotation.ignoreRequestArgs().length > 0) {
             String[] parameterNames = ((MethodSignature) proceedingJoinPoint.getSignature()).getParameterNames();
             if (parameterNames.length > 0) {
-                List<String> ignoreList = Arrays.stream(annotation.ignoreRequestArgs()).collect(Collectors.toList());
+                Set<String> ignoreSet = new HashSet<>(Arrays.stream(annotation.ignoreRequestArgs()).collect(Collectors.toList()));

Review comment:
       Yeah. The HashSet object can be constructed by toSet() directly.




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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