LinkedMultiValueMap.getFirst - check that values is not empty
@ -81,7 +81,7 @@ public class LinkedMultiValueMap<K, V> implements MultiValueMap<K, V>, Serializa
@Nullable
public V getFirst(K key) {
List<V> values = this.targetMap.get(key);
return (values != null ? values.get(0) : null);
return (values != null && !values.isEmpty() ? values.get(0) : null);
}
@Override