presto-cli/src/main/java/io/prestosql/cli/AbstractWarningsPrinter.java/AbstractWarningsPrinter/print
class AbstractWarningsPrinter:    @Override
    public void print(List<Warning> warnings, boolean withInitialSeparator, boolean withTrailingSeparator)
    {
        requireNonNull(warnings, "warnings is null");
        List<String> newWarnings = getNewWarnings(warnings);
        if (withInitialSeparator) {
            if (withTrailingSeparator) {
                printWithSeparators(newWarnings);
            }
            else {
                printWithInitialSeparator(newWarnings);
            }
        }
        else if (withTrailingSeparator) {
            printWithTrailingSeparator(newWarnings);
        }
        else {
            print(newWarnings);
        }
    }