Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failure in InnerHitBuilderTests around 'fields' option. (#62344)
The case InnerHitBuilderTests#testEqualsAndHashcode creates a copy of the object by serializing + deserializing it, then applies a modification. If the 'fields' list is empty, then deserializing it results in Collections.emptyList. Because this is immutable, then modifying it can throw an UnsupportedOperationException. This PR takes the same approach as for docvalue_fields, where we create a new list instead of trying to add to an empty one.
- Loading branch information