- In the IDEA main menu, choose File | Settings, and then under Project Settings click Inspections.
- In the list of the IntelliJ IDEA inspections, expand the Probable bugs node, and then click '==' or '!=' instead of 'equals()'.
Image Removed Image Added
- Under Options, you can specify the following plugin settings:
- From the Severity list, select the severity level (such as Warning, Info, etc.)
- In the text box under Severity, specify the semicolon separated list of Java classes to be affected by this code inspection.
- When finished, click OK.
How It Works?
The plugin inspects your code opened in the IntelliJ IDEA editor or the code you are typing. The plugin highlights the code fragments where two variables of the reference type are separated by == or != and proposes to replace this code fragment with *.equals():