presto-jdbc/src/main/java/io/prestosql/jdbc/WarningsManager.java/WarningsManager/addWarning
class WarningsManager:    private synchronized void addWarning(Warning warning)
    {
        requireNonNull(warning, "warning is null");
        if (lastWarning == null) {
            lastWarning = new PrestoSqlWarning(warning);
        }
        else {
            lastWarning.setNextWarning(new PrestoSqlWarning(warning));
        }
        if (firstWarning == null) {
            firstWarning = lastWarning;
        }
        else {
            lastWarning = lastWarning.getNextWarning();
        }
    }