[lvcs] cleanup: check parameter class in the equals method

GitOrigin-RevId: 072bcff22001d9f98289909fd4d60fdb454f509f
This commit is contained in:
Julia Beliaeva
2024-05-27 16:58:27 +02:00
committed by intellij-monorepo-bot
parent 51bac89441
commit becb0096fb

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.history.core;
@@ -89,7 +89,9 @@ public class StoredContent extends Content {
@Override
public boolean equals(Object o) {
return myContentId == ((StoredContent)o).myContentId;
if (this == o) return true;
if (!(o instanceof StoredContent content)) return false;
return myContentId == content.myContentId;
}
@Override