Fix/suppress 'expression compared to itself' problems

GitOrigin-RevId: c5c0bfdf38186db622509009de02b92ae46045bc
This commit is contained in:
Tagir Valeev
2024-05-14 14:22:13 +02:00
committed by intellij-monorepo-bot
parent 8fad668268
commit 29dfce5e79
3 changed files with 3 additions and 2 deletions

View File

@@ -337,7 +337,7 @@ class JBCefOsrComponent extends JPanel {
return e1.getComponent() == e2.getComponent() &&
e1.getID() == e2.getID() &&
e1.getModifiersEx() == e2.getModifiersEx() &&
e1.isPopupTrigger() == e1.isPopupTrigger() &&
e1.isPopupTrigger() == e2.isPopupTrigger() &&
e1.getScrollType() == e2.getScrollType() &&
distance < TOLERANCE;
}

View File

@@ -39,6 +39,7 @@ final class ValueSerializationChecker<Value, Input> {
private @Nullable Exception getValueSerializationProblem(@NotNull Map<?, Value> data, @NotNull Input input) {
for (final Value value : data.values()) {
//noinspection ExpressionComparedToItself
if (!(Comparing.equal(value, value) && (value == null || value.hashCode() == value.hashCode()))) {
return new Exception("Index " + myIndexId + " violates equals / hashCode contract for Value parameter");
}

View File

@@ -874,7 +874,7 @@ public final class IdeaProjectSerializationService implements SerializationServi
@Override
public boolean equals(IdeaCompilerOutput o1, IdeaCompilerOutput o2) {
return o1 == o2 || o1 != null && o2 != null &&
o1.getInheritOutputDirs() == o1.getInheritOutputDirs() &&
o1.getInheritOutputDirs() == o2.getInheritOutputDirs() &&
compare(o1.getOutputDir(), o2.getOutputDir(), new FilePathComparator()) == 0 &&
compare(o1.getTestOutputDir(), o2.getTestOutputDir()) == 0;
}