Suppress duplicate warnings in IntelliJ IDEA by annotation

后端 未结 3 1192
遇见更好的自我
遇见更好的自我 2021-01-31 01:26

Since version 15, IntelliJ warns me about code duplicates.

In some cases this might be intentional, so I want to ignore/suppress this warning by using the @Suppres

3条回答
  •  耶瑟儿~
    2021-01-31 01:49

    This works for me. You have to set it on both classes/methods if you want to suppress the warning both places.

    @SuppressWarnings("Duplicates")
    private void myDuplicatedMethod() {
        ...
    }
    

提交回复
热议问题