okta-sdk-java icon indicating copy to clipboard operation
okta-sdk-java copied to clipboard

PasswordPolicyRule equals method is ignoring parent attributes

Open Mochis opened this issue 3 months ago • 1 comments

Describe the bug?

The PasswordPolicyRule equals method is not including parent attributes in the comparison.

What is expected to happen?

The PasswordPolicyRule equals method take into account the parent attributes.

What is the actual behavior?

When creating a Set of two differents PasswordPolicyRule the method is throwing a duplicate elements exception.

Reproduction Steps?

For example,

  • PasswordPolicyRule r1 --> priority = 1, name = "R1"
  • PasswordPolicyRule r2 --> priority = 2, name = "R2"

Set.of(r1, r2); // throws exception

Additional Information?

No response

Java Version

openjdk version "24.0.2" 2025-07-15 OpenJDK Runtime Environment Temurin-24.0.2+12 (build 24.0.2+12) OpenJDK 64-Bit Server VM Temurin-24.0.2+12 (build 24.0.2+12, mixed mode, sharing)

SDK Version

24.0.0

OS version

No response

Mochis avatar Oct 01 '25 23:10 Mochis

I think this PR generated the bug https://github.com/okta/okta-sdk-java/pull/967

Mochis avatar Oct 02 '25 11:10 Mochis