[jOOQ/jOOQ#10169] Correct application of Oxford comma 🧐

This commit is contained in:
Lukas Eder 2020-05-06 13:50:05 +02:00
parent a2c46b838d
commit 068f53da3a

View File

@ -11945,6 +11945,9 @@ final class ParserContext {
for (int i = 0; i < objects.length; i++)
if (i == 0)
sb.append(objects[i]);
// [#10169] Correct application of Oxford comma 🧐
else if (i == 1 && objects.length == 2)
sb.append(" or ").append(objects[i]);
else if (i == objects.length - 1)
sb.append(", or ").append(objects[i]);
else