@@ -130,19 +130,17 @@ public Connection connect(String url, Properties info) throws SQLException {
130130 throw new BigQueryJdbcException (e .getMessage (), e );
131131 }
132132
133+ DataSource ds = DataSource .fromUrl (connectionUri );
134+
133135 // LogLevel
134- String logLevelStr =
135- BigQueryJdbcUrlUtility .parseUriProperty (
136- connectionUri , BigQueryJdbcUrlUtility .LOG_LEVEL_PROPERTY_NAME );
136+ String logLevelStr = ds .getLogLevel ();
137137 if (logLevelStr == null ) {
138138 logLevelStr = System .getenv (BigQueryJdbcUrlUtility .LOG_LEVEL_ENV_VAR );
139139 }
140140 Level logLevel = BigQueryJdbcUrlUtility .parseLogLevel (logLevelStr );
141141
142142 // LogPath
143- String logPath =
144- BigQueryJdbcUrlUtility .parseUriProperty (
145- connectionUri , BigQueryJdbcUrlUtility .LOG_PATH_PROPERTY_NAME );
143+ String logPath = ds .getLogPath ();
146144 if (logPath == null ) {
147145 logPath = System .getenv (BigQueryJdbcUrlUtility .LOG_PATH_ENV_VAR );
148146 }
@@ -153,7 +151,7 @@ public Connection connect(String url, Properties info) throws SQLException {
153151 BigQueryJdbcRootLogger .setLevel (logLevel , logPath );
154152
155153 // Logging starts from here.
156- BigQueryConnection connection = new BigQueryConnection (connectionUri );
154+ BigQueryConnection connection = new BigQueryConnection (connectionUri , ds );
157155 LOG .info (
158156 "Driver info : { {Database Product Name : %s}, "
159157 + "{Database Product Version : %s}, "
@@ -216,8 +214,10 @@ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) {
216214 driverProperty .description = prop .getDescription ();
217215 propertyInfoList .add (driverProperty );
218216 }
217+
218+ DataSource ds = DataSource .fromUrl (connectionUri );
219219 Map <String , String > oAuthProperties =
220- BigQueryJdbcOAuthUtility .parseOAuthProperties (url , this .toString ());
220+ BigQueryJdbcOAuthUtility .parseOAuthProperties (ds , this .toString ());
221221 for (Map .Entry <String , String > authProperty : oAuthProperties .entrySet ()) {
222222 propertyInfoList .add (new DriverPropertyInfo (authProperty .getKey (), authProperty .getValue ()));
223223 }
0 commit comments