Skip to content

Commit 702673e

Browse files
authored
False positive diff for array with maxItems fix
1 parent 5b82a8b commit 702673e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/java/org/openapitools/openapidiff/core/model/schema/ChangedMaxItems.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public ChangedMaxItems(Integer oldValue, Integer newValue, DiffContext context)
1717

1818
@Override
1919
public DiffResult isChanged() {
20-
if (oldValue == newValue) {
20+
if (Objects.equals(oldValue == newValue)) {
2121
return DiffResult.NO_CHANGES;
2222
}
2323
if (oldValue == null || newValue == null) {

core/src/main/java/org/openapitools/openapidiff/core/model/schema/ChangedMinItems.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public ChangedMinItems(Integer oldValue, Integer newValue, DiffContext context)
1717

1818
@Override
1919
public DiffResult isChanged() {
20-
if (oldValue == newValue) {
20+
if (Objects.equals(oldValue, newValue)) {
2121
return DiffResult.NO_CHANGES;
2222
}
2323
if (oldValue == null || newValue == null) {

0 commit comments

Comments
 (0)