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


##########
inlong-common/src/main/java/org/apache/inlong/common/enums/TaskTypeEnum.java:
##########
@@ -42,47 +48,41 @@ public enum TaskTypeEnum {
 
     ;
 
+    private static final Map<Integer, String> taskTypeEnumHashMap = 
Maps.newHashMap();
+
+    /*
+     * Init tasktype
+     */
+    static {
+        taskTypeEnumHashMap.put(0, "DATABASE_MIGRATION");

Review Comment:
   Perhaps you can use this:
   
   ```java
   CODE_TYPE_MAP.putAll(Arrays.stream(TaskTypeEnum.values())
           .collect(Collectors.toMap(TaskTypeEnum::getType, type -> type)));
   ```



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