Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1453] Evolve raw string identifier to semantic entity #1454

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

ruspl-afed
Copy link
Contributor

Rework String feature identifier to a dedicated type FeatureIdentifier

Copy link
Contributor

@eparovyshnaya eparovyshnaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very careful work. Special thanks for side improvements.

Only one note, which is mandatory to meet, but not necessarily in this MR.

FeatureIdentifier 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 FeatureIdentifier interface as well.

This means that there should be a contract test for this interface.

We rely on FeatureIdentifier 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 BaseFeatureIdentifier.

@eparovyshnaya eparovyshnaya added this to the 4.0.0 milestone Nov 10, 2024
@eparovyshnaya eparovyshnaya added the component::api Eclipse Passage API label Nov 10, 2024
@ruspl-afed ruspl-afed force-pushed the 1453 branch 5 times, most recently from e96d9ee to 3f3fc0f Compare November 11, 2024 20:26
Rework `String` feature identifier to a dedicated type
`FeatureIdentifier`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component::api Eclipse Passage API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants