Is There An Inspection For Duplicate Public Constants?
已回答
Whilst going through some legacy code I found some constants in different classes with the same content.
e.g.
Class1:
public static final String LOCATION = "Area-Location";
Class2:
public static final String LOCATION_ATTR = "Area-Location";
Is there an inspection that I can run to search for more of these?
The "Duplicate String Literal" is more for finding potential strings that could be refactored rather than looking for duplicate constants.
请先登录再写评论。
Yes: