You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UserIdentifier interface is used by core, among other ways, as a key to HashMaps.
This usage lies obligations on this interface (hashCode() and equals() impls should be in synch).
The only implementation of this interface is record, so it meets the requirement automatically. But custom implementations of Access Cycle Configuration services can potentially supply their own implementation for UserIdentifier interface as well.
This means that there should be a contract test for this interface.
We rely on UserIdentifier implementation to
do not tolerate null as construction input
have synchronous equals() and hashCode(), meaning different instances, constructed with equal strings, beget true for equals() and have the same hashCode().
This contract test must be implemented for BaseUserIdentifier.
The text was updated successfully, but these errors were encountered:
Extracted from #1454 (review) by @eparovyshnaya
UserIdentifier
interface is used by core, among other ways, as a key to HashMaps.This usage lies obligations on this interface (
hashCode()
andequals()
impls should be in synch).The only implementation of this interface is
record
, so it meets the requirement automatically. But custom implementations of Access Cycle Configuration services can potentially supply their own implementation forUserIdentifier
interface as well.This means that there should be a contract test for this interface.
We rely on
UserIdentifier
implementation tonull
as construction inputequals()
andhashCode()
, meaning different instances, constructed with equal strings, begettrue
forequals()
and have the samehashCode()
.This contract test must be implemented for
BaseUserIdentifier
.The text was updated successfully, but these errors were encountered: