Skip to content

Commit

Permalink
use nullOrEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
plutaniano committed Nov 29, 2024
1 parent f1456fc commit e4883f9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -35,7 +37,7 @@ private static Map<String, String> parseQueryParams(String jdbcURL) {
URI uri = new URI(jdbcURL.substring(jdbcURL.indexOf(":") + 1));
Map<String, String> queryPairs = new LinkedHashMap<>();
String query = uri.getQuery();
if (query != null && !query.isEmpty()) {
if (!nullOrEmpty(query)) {
String[] pairs = query.split("&");
for (String pair : pairs) {
int idx = pair.indexOf("=");
Expand Down

0 comments on commit e4883f9

Please sign in to comment.