Source:
<code>public static ConnectionInfo fromUrl(@Nullable PluginContainer container, String fullUrl) throws SQLException { Matcher match = URL_REGEX.matcher(fullUrl); if (!match.matches()) { throw new IllegalArgumentException("URL " + fullUrl + " is not a valid JDBC URL"); } final String protocol = match.group(1); final boolean hasSlashes = match.group(2) != null; final String user = match.group(3); final String pass = match.group(4); String serverDatabaseSpecifier = match.group(5); BiFunction<PluginContainer, String, String> derelativizer = PATH_CANONICALIZERS.get(protocol); if (container != null && derelativizer != null) { serverDatabaseSpecifier = derelativizer.apply(container, serverDatabaseSpecifier); } final String unauthedUrl = "jdbc:" + protocol + (hasSlashes ? "://" : ":") + serverDatabaseSpecifier; final String driverClass = DriverManager.getDriver(unauthedUrl).getClass().getCanonicalName(); if (protocol.equals("mysql")) { <START> return new ConnectionInfo(user, pass, driverClass, unauthedUrl + "?disableMariaDbDriver", fullUrl); <END> } else { return new ConnectionInfo(user, pass, driverClass, unauthedUrl, fullUrl); } }</code><technical_language>This hack produce invalid result jdbc url contains some parameters. java String jdbcUrl = "jdbc:mysql://zml:totallymypassword@localhost/sponge?useSSL=false"; SqlServiceImpl.ConnectionInfo subject = SqlServiceImpl.ConnectionInfo.fromUrl(null, jdbcUrl); System.out.println(subject.getAuthlessUrl()); // outputs: jdbc:mysql://localhost/sponge?useSSL=false?disableMariaDbDriver Checking for question mark appending &disableMariaDbDriver is a solution. Possibility of setting custom data source properties user key-value map in sponge configs needed. is need maintain compatibility existing configurations put properties in jdbc url. This involves parsing of query string in fromUrl factory method well</technical_language>

Target:
public static ConnectionInfo fromUrl(@Nullable PluginContainer container, String fullUrl) throws SQLException { Matcher match = URL_REGEX.matcher(fullUrl); if (!match.matches()) { throw new IllegalArgumentException("URL " + fullUrl + " is not a valid JDBC URL"); } final String protocol = match.group(1); final boolean hasSlashes = match.group(2) != null; final String user = match.group(3); final String pass = match.group(4); String serverDatabaseSpecifier = match.group(5); BiFunction<PluginContainer, String, String> derelativizer = PATH_CANONICALIZERS.get(protocol); if (container != null && derelativizer != null) { serverDatabaseSpecifier = derelativizer.apply(container, serverDatabaseSpecifier); } final boolean hasOptions = match.group(6) != null; final Set<String> rawOptions = hasOptions ? Sets.newHashSet(match.group(7).split("&")) : Collections.EMPTY_SET; final String options = !rawOptions.isEmpty() ? "?" + String.join("&", rawOptions) : ""; final String unauthedUrl = "jdbc:" + protocol + (hasSlashes ? "://" : ":") + serverDatabaseSpecifier; final String driverClass; if (protocol.equals("mysql")) { driverClass = MYSQL_DRIVER_CLASS_NAME; } else { driverClass = DriverManager.getDriver(unauthedUrl).getClass().getCanonicalName(); } return new ConnectionInfo(user, pass, options, driverClass, unauthedUrl, fullUrl); }