-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #18848: "Failed to parse query parameters from JDBC URL" when query is an empty string #18850
Conversation
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
@@ -35,7 +35,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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plutaniano thanks for the PR. We actually have nullOrEmpty
from CommonUtils
you can use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
e4883f9
to
bbe0cef
Compare
Quality Gate passed for 'open-metadata-ingestion'Issues Measures |
Describe your changes:
Fixes #18848
When
query
is an empty string,indexOf
returns -1, which results insubtring(0, -1)
, causing an error.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>