diff --git a/java/java-impl/src/inspectionDescriptions/UseHashCodeMethodInspection.html b/java/java-impl/src/inspectionDescriptions/UseHashCodeMethodInspection.html index 830d942e8df1..6fdb78d4f284 100644 --- a/java/java-impl/src/inspectionDescriptions/UseHashCodeMethodInspection.html +++ b/java/java-impl/src/inspectionDescriptions/UseHashCodeMethodInspection.html @@ -1,19 +1,15 @@ -

-Informs you when bitwise operations can be replaced with the Long.hashCode() or Double.hashCode() method. - It detects instances of the pattern (int)(x ^ (x >>> 32)) where x is a variable of type long or - the result of the previous Double.doubleToLongBits() call. This replacement shortens the code improves its readability. -

-

- Example: -

+Reports bitwise operations that can be replaced with a call to the Long.hashCode() or Double.hashCode() methods. +It detects the construct (int)(x ^ (x >>> 32)) where x is a variable of type long or +the result of a previous Double.doubleToLongBits() call. The replacement shortens the code, improving its readability. +

Example:


-int result = (int)(var ^ (var >>> 32));
+  int result = (int)(var ^ (var >>> 32));
 
-After applying the quick-fix: +

After applying the quick-fix:


-int result = Long.hashCode(var);
+  int result = Long.hashCode(var);
 

This inspection only reports if the language level of the project or module is 8 or higher.