Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Policy equality fails for binding list order #173

Description

@chingor13

The binding list order should not matter for the equivalence of Policy objects:

@TestpublicvoidtestPolicyOrderShouldNotMatter() {
Rolerole1 = Role.of("role1");
Identityidentity1 = Identity.user("user1@example.com");
Rolerole2 = Role.of("role2");
Identityidentity2 = Identity.user("user2@example.com");
Policypolicy1 = Policy.newBuilder()
.addIdentity(role1, identity1)
.addIdentity(role2, identity2)
.build();
Policypolicy2 = Policy.newBuilder()
.addIdentity(role2, identity2)
.addIdentity(role1, identity1)
.build();
assertEquals(policy1, policy2);
}

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions