Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Properties;
import java.util.logging.Logger;

import static com.google.common.base.Preconditions.checkState;
import static java.util.Objects.requireNonNull;

public class TracingDataSource
Expand Down Expand Up @@ -70,7 +71,9 @@ public JdbcDataSource(Driver driver, String connectionUrl, Properties properties
public Connection getConnection()
throws SQLException
{
return driver.connect(connectionUrl, properties);
Connection connection = driver.connect(connectionUrl, properties);
checkState(connection != null, "Driver returned null connection, make sure the connection URL '%s' is valid for the driver %s", connectionUrl, driver);
return connection;
}

@Override
Expand Down