diff src/main/java/org/monetdb/jdbc/MonetDriver.java @ 939:fd938d0a2b3a

Include all Parameters in GetPropertyInfo Not just user, password, tls and cert.
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Wed, 08 Jan 2025 15:41:48 +0100 (3 months ago)
parents d416e9b6b3d0
children
line wrap: on
line diff
--- a/src/main/java/org/monetdb/jdbc/MonetDriver.java
+++ b/src/main/java/org/monetdb/jdbc/MonetDriver.java
@@ -155,8 +155,13 @@ public final class MonetDriver implement
 		if (!acceptsURL(url))
 			return null;
 
-		// delegate to mcl.net.Parameters enum class, which maintains all connection properties
-		return Parameter.getPropertyInfo(info, url.startsWith("jdbc:monetdbs:"));
+		// Delegate to enum mcl.net.Parameters, which maintains all connection properties.
+		// Note that if the URL starts with jdbc:monetdb://, TLS is always off.
+		// If it starts with jdbc:monetdbs://, TLS is always on.
+		// Only when the URL is exactly "jdbc:monetdb:", without slashes, TLS is determined
+		// by the properties.
+		boolean includeTls = (url.equals("jdbc:monetdb:") || url.startsWith("jdbc:monetdbs:"));
+		return Parameter.getPropertyInfo(info, includeTls);
 	}
 
 	/**