From eb018359e65fe951cfd7d500d339188047cb4f01 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Wed, 10 Aug 2016 18:31:10 +0300 Subject: [PATCH] wording, example added --- .../EqualityOperatorComparesObjects.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualityOperatorComparesObjects.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualityOperatorComparesObjects.html index 5263c25e35ac..0f0cf5b98103 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualityOperatorComparesObjects.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualityOperatorComparesObjects.html @@ -1,7 +1,17 @@ This inspection reports == and != equality operators that compare two objects. -

The quick fix offers to replace the equality operators with calls of the .equals() method - or with the safe .equals() method construct. +For example:
if (object1 == object2) {} +

Quick fix replaces '==' with .equals(): +

object1.equals(object2); +

or with safe .equals(): +