github / github/codeql

LGTM.com - false positive: Java Set equals()

Ouverte
#3,524 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
false-positive Java
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

**Description of the false positive**
"Call to equals() comparing incomparable types AbstractSet and ImmutableSet."

This actually works just fine, because AbstractSet and ImmutableSet only use the Set<> interface's semantics, and do not rely on what implementation of Set they are.

**URL to the alert on the project page on LGTM.com**

https://lgtm.com/projects/g/google/error-prone/snapshot/30c381a82e01a40b3f7f255ed05d0857bcf0d35e/files/core/src/main/java/com/google/errorprone/bugpatterns/UnnecessaryDefaultInEnumSwitch.java?sort=name&dir=ASC&mode=heatmap#L96

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.