Skip to content

Conversation

@laeubi
Copy link

@laeubi laeubi commented Feb 22, 2024

The API of Capability/Requirement currently defines the contract to be: This Capability/Requirement is equal to another Capability/Requirement if they have the same namespace, directives and attributes and are declared by the same resource.

But Felix currently implements hashCode/equals in terms of object identity.

This is the counterpart for

The API of Capability/Requirement currently defines the contract to be:
This Capability/Requirement is equal to another Capability/Requirement
if they have the same namespace, directives and attributes and are
declared by the same resource.

But Felix currently implements hashCode/equals in terms of object
identity.
private final Map<String, Object> m_attrs;
private final List<String> m_uses;
private final Set<String> m_mandatory;
private transient int hashCode;
Copy link
Contributor

Choose a reason for hiding this comment

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

the formatting may use the same number of tabs as before

@stbischof
Copy link
Contributor

stbischof commented Feb 22, 2024

@tjwatson do we have some ci here?

do we may need an github workflow

@laeubi do we have an osgi-tck test that coverts this behavier?

@stbischof stbischof requested a review from karlpauls February 22, 2024 13:21
@tjwatson
Copy link
Member

@tjwatson do we have some ci here?

Not sure what you are asking here. Probably a question for @karlpauls

@laeubi do we have an osgi-tck test that coverts this behavier?

Need caution here as I remember Richard Hall and I designing the resource and resolver APIs such that the framework can use identity equality for capabilities and bundle revisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants