Refactoring to enums 关注
For the code like this
public static final String ADD = "Add";
public static final String MOVE = "Move";
public static final String REMOVE = "Remove";
Can be automatically converted to JDK enums and vise versa.. if we were to convert enum code to lower JDK.
Intellij should consider to introduce this refactoring approach.
Raja Nagendra Kumar,
- Java Product Code Audit Experts
+1 (8 years later)
Seems you could select those strings and run "Refactor | Extract | Delegate" (don't forget to check "Extract as enum")
Not bad. Thanks Yaroslav!