Skip to content
Open
Show file tree
Hide file tree
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 @@ -75,7 +75,9 @@ public Logger getParentLogger() {
public ArrowFlightConnection connect(final String url, final Properties info)
throws SQLException {
final Properties properties = new Properties(info);
properties.putAll(info);
if (info != null) {
properties.putAll(info);
}

if (url != null) {
final Optional<Map<Object, Object>> maybeProperties = getUrlsArgs(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,30 @@ public void testConnectWithInsensitiveCasePropertyKeys2() throws Exception {
}
}

/**
* Tests whether the {@link ArrowFlightJdbcDriver} can establish a successful connection to the
* Arrow Flight client when provided with null properties.
*/
@Test
public void testConnectWithNullProperties() throws Exception {
final Driver driver = new ArrowFlightJdbcDriver();
try (Connection connection =
driver.connect(
"jdbc:arrow-flight://"
+ dataSource.getConfig().getHost()
+ ":"
+ dataSource.getConfig().getPort()
+ "?"
+ "useEncryption=false"
+ "&user="
+ dataSource.getConfig().getUser()
+ "&password="
+ dataSource.getConfig().getPassword(),
null)) {
assertTrue(connection.isValid(300));
}
}

/**
* Tests whether an exception is thrown upon attempting to connect to a malformed URI.
*
Expand Down
Loading