IDEA presentation found duplicate code

 

reason:

  IntelliJ IDEA提示Found duplicated code in this file

  It's not that our code is wrong, it's that the idea prompts that our code is duplicated, and we have the same code snippet elsewhere in the project

solve:

  i>: encapsulate our code, abstract it into a method

  ii>: Set the configuration of IDEA, as shown in the figure:

    

 

In this way, the Found duplicated code in this file prompt will not be reported.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325212964&siteId=291194637