When using withEqualsForFieldsMatchingRegexes and both original and compare values are null NPE is thrown in:
/assertj-core-3.24.2-sources.jar!/org/assertj/core/api/recursive/comparison/RecursiveComparisonDifferenceCalculator.java:172
getCustomErrorMessage does not have custom message registered and tries getting from value's class, and since value is null we get a NPE.
Since withErrorMessageForFields does not work for regexp values there is no way to walkaround this.
Having ability to have custom message for regexp values would be also great, but I guess this is out of scope for this ticket.
- assertj core version: 3.24.2
- java version: 17
When using
withEqualsForFieldsMatchingRegexesand both original and compare values are null NPE is thrown in:getCustomErrorMessagedoes not have custom message registered and tries getting from value's class, and since value is null we get a NPE.Since
withErrorMessageForFieldsdoes not work for regexp values there is no way to walkaround this.Having ability to have custom message for regexp values would be also great, but I guess this is out of scope for this ticket.