public static boolean validateOrInitialize(Connection rawConnection, String sqlQuery, ViburConfig config) {
    """
	Validates/ initializes the given {@code rawConnection} via executing the given {@code sqlQuery}.
	
	@param rawConnection the raw connection to validate/ initialize
	@param sqlQuery must be a valid SQL query, a special value of {@code isValid} in which case
	the {@link Connection#isValid} method will be called, or {@code null}
	in which case no validation/ initialization will be performed
	@param config the Vibur config
	@return {@code true} if the given connection is successfully validated/ initialized; {@code false} otherwise
    """
        if (sqlQuery == null) {
            return true;
        }

        try {
            if (sqlQuery.equals(IS_VALID_QUERY)) {
                return rawConnection.isValid(config.getValidateTimeoutInSeconds());
            }

            executeSqlQuery(rawConnection, sqlQuery, config);
            return true;
        } catch (SQLException e) {
            logger.debug("Couldn't validate/ initialize rawConnection {}", rawConnection, e);
            return false;
        }
    }
public static boolean validateOrInitialize(Connection rawConnection, String sqlQuery, ViburConfig config) {
        if (sqlQuery == null) {
            return true;
        }

        try {
            if (sqlQuery.equals(IS_VALID_QUERY)) {
                return rawConnection.isValid(config.getValidateTimeoutInSeconds());
            }

            executeSqlQuery(rawConnection, sqlQuery, config);
            return true;
        } catch (SQLException e) {
            logger.debug("Couldn't validate/ initialize rawConnection {}", rawConnection, e);
            return false;
        }
    }
public static boolean validateOrInitialize ( Connection rawConnection , String sqlQuery , ViburConfig config ) { if ( sqlQuery == null ) { return true ; } try { if ( sqlQuery . equals ( IS_VALID_QUERY ) ) { return rawConnection . isValid ( config . getValidateTimeoutInSeconds ( ) ) ; } executeSqlQuery ( rawConnection , sqlQuery , config ) ; return true ; } catch ( SQLException e ) { logger . debug ( "Couldn't validate/ initialize rawConnection {}" , rawConnection , e ) ; return false ; } }
Validates/ initializes the given {@code rawConnection} via executing the given {@code sqlQuery}.

@param rawConnection the raw connection to validate/ initialize
@param sqlQuery must be a valid SQL query, a special value of {@code isValid} in which case
the {@link Connection#isValid} method will be called, or {@code null}
in which case no validation/ initialization will be performed
@param config the Vibur config
@return {@code true} if the given connection is successfully validated/ initialized; {@code false} otherwise
Validates / initializes the given { @code rawConnection } via executing the given { @code sqlQuery } .