-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.
Description
Two V1Secret instances deserialized from the same YAML are not equal. In fact, V1Secret.equals(Object o)
always returns false. This is because V1Secret.data = Map<String, byte[]>
.
private Map<String, byte[]> data = null; |
The equals
method on a Java array type is equivalent to ==
. So this line returns false.
Objects.equals(this.data, v1Secret.data) && |
Would you be open to patches for this? If so, what's the right approach? Keep the V1Secret.data = Map<String, byte[]>
and modify the line above to loop through the map checking keys are equal with Objects.equals()
and byte[]
values are equal with java.util.Arrays.equals(...)
?
Metadata
Metadata
Assignees
Labels
lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.