This change makes the JSONWriterTest.testArrnvpWriterOverridesAllWrites fail because it expects that the ArrayOfNamedValuePairJSONWriter class added in
SOLR-9442 overrides all public/protected writeXXX methods from JSONWriter. However, this change introduced two new public/protected methods writeJsonIter(java.util.Iterator) and writeArray(java.lang.String,java.util.List) which aren't overriden by ArrayOfNamedValuePairJSONWriter.
This patch fixes it by adding a writeArray(java.lang.String,java.util.List) in ArrayOfNamedValuePairJSONWriter which delegates to writeArray(String name, Iterator val) and making writeJsonIter private (which is used internally by both variants of writeArray in the super class. If we ever have a need for overriding writeJsonIter directly, we can make it protected then.