It's currently not possible to create multiple empty string values in a StaticList xproperty.
For example with a StaticList xproperty defined with | as the only separator, the value ||s will create two values: an empty string, followed by a s, where we'd expect three values: two empty strings, followed by a s.
This type of usecase should be allowed, but we need to be careful to handle properly usecases with several separators and whitespaces. For example if a space is considered as separator, multiple whitespaces between the values are probably not meaning several empty values between the values, but most probably a typo produced by the user.
In the same way, by deault the separators used in static list are |, and space: it's common to have values such as Foo, Bar. In that case, we have , followed by a space, so two separators which could create and empty string value. This is actually a problem raised in
XWIKI-17000 already so we need to be sure to not break this.
More globally it seems better to only consider that an empty string is created if the same separator is used twice, so here's some examples when considering a StaticList xproperty with the 3 separators ,| and space:
- a,b -> [a,b]
- a,,b -> [a, ,b]
- a,|b -> [a,b]
- a , b -> [a,b]
- a b -> [a,b]
- a,||b -> [a,,b]