Skip to content

Fix ArithmeticException when expected array is empty in ArrayValueMatcher - #208

Open
arimu1 wants to merge 1 commit into
skyscreamer:masterfrom
arimu1:fix/issue-206-array-value-matcher-empty-expected
Open

arimu1 wants to merge 1 commit into
skyscreamer:masterfrom
arimu1:fix/issue-206-array-value-matcher-empty-expected

Conversation

@arimu1

@arimu1 arimu1 commented Sep 12, 2026

Copy link
Copy Markdown

Summary

Fixes #206

Test plan

  • mvn test -Dtest=ArrayValueMatcherTest (Java 21)

When ArrayValueMatcher receives an empty expected JSONArray but the actual
array has elements to compare, fail with a clear message instead of throwing
ArithmeticException from modulo by zero.

Fixes skyscreamer#206
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.

Exception when comparing actual JSON containing a no empty array to an expected JSON containing empty array

1 participant