mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-24 22:18:41 +00:00
Fixes #18848: "Failed to parse query parameters from JDBC URL" when query is an empty string (#18850)
* ISSUE-18848: add missing String.isEmpty() check * ISSUE-18848: use nullOrEmpty --------- Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com>
This commit is contained in:
parent
e9186dc577
commit
cbe32412b0
@ -1,5 +1,7 @@
|
||||
package org.openmetadata.service.util.jdbi;
|
||||
|
||||
import static org.openmetadata.common.utils.CommonUtil.nullOrEmpty;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.LinkedHashMap;
|
||||
@ -35,7 +37,7 @@ public class DatabaseAuthenticationProviderFactory {
|
||||
URI uri = new URI(jdbcURL.substring(jdbcURL.indexOf(":") + 1));
|
||||
Map<String, String> queryPairs = new LinkedHashMap<>();
|
||||
String query = uri.getQuery();
|
||||
if (query != null) {
|
||||
if (!nullOrEmpty(query)) {
|
||||
String[] pairs = query.split("&");
|
||||
for (String pair : pairs) {
|
||||
int idx = pair.indexOf("=");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user