ValidatorConfig: Avoid 'stream::iterator'

The method reference stream::iterator is considered unsafe as it's
mapped to the Iterable interface which can be iterated multiple times
whereas a stream may only be iterated once.

I268068f84 did a similar cleanup in core Gerrit. This change improves
the only usage of stream::iterator in the uploadvalidator plugin.

In the specific case of ValidatorConfig, we can safely switch to a
manifestation of an ImmutableList as ValidatorConfig#groupUUID returns
only non-null values and conf.getStringList("skipGroup") already
reads/manifests all values. Hence, there shouldn't be any negative
side-effects when switching to an ImmutableList here.

Change-Id: Ib81ef3b5e0e6e254d4e3189de49abfa37415771d
1 file changed