typelevel/cats

Make `Hash.fromUniversalHashCode` null safe

Aperta

#4831 aperta il 22 feb 2026

 (6 commenti) (1 reazione) (1 assegnatario)Scala (1241 fork)batch import
good first issue

Metriche repository

Star
 (5438 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Similarly to how Show.fromToString have been recently made null safe (#4689 and #4790), I propose making Hash.fromUniversalHashCode also null safe. Specifically, I think it should use x.## instead of x.hashCode(). (The eqv method is already fine, as it uses ==.)

Guida contributor