You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "mxnzx (via GitHub)" <gi...@apache.org> on 2025/08/24 09:54:08 UTC
[PR] [#8195] fix(flink-jdbc): validate required 'jdbc-url' in toFlinkCatalogProperties to prevent NPE [gravitino]
mxnzx opened a new pull request, #8263:
URL: https://github.com/apache/gravitino/pull/8263
### What changes were proposed in this pull request?
- Validate required property GRAVITINO_JDBC_URL in JdbcPropertiesConverter#toFlinkCatalogProperties to prevent NPE.
- Throw IllegalArgumentException with a clear message when jdbc-url is missing or blank, instead of letting an NPE occur.
- `Tests` : add the test `testToJdbcCatalogPropertiesWithoutUrl()` in AbstractJdbcPropertiesConverterTestSuite
### Why are the changes needed?
- When jdbc-url is missing, the current implementation can throw a NullPointerException during URL processing. Failing fast with a meaningful validation error improves debuggability and avoids leaking internal details.
Fix: #8195
### Does this PR introduce *any* user-facing change?
- APIs / property keys: No changes.
- Behavior: If jdbc-url is missing, the code now throws IllegalArgumentException with a descriptive message (previously resulted in an NPE).
### How was this patch tested?
Local runs:
```
./gradlew spotlessApply
./gradlew test -PskipITs
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8195] fix(flink-jdbc): validate required 'jdbc-url' in toFlinkCatalogProperties to prevent NPE [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #8263:
URL: https://github.com/apache/gravitino/pull/8263#issuecomment-3221926568
Thanks again for your help here, I put up some more good first issues to work on today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8195] fix(flink-jdbc): validate required 'jdbc-url' in toFlinkCatalogProperties to prevent NPE [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean merged PR #8263:
URL: https://github.com/apache/gravitino/pull/8263
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8195] fix(flink-jdbc): validate required 'jdbc-url' in toFlinkCatalogProperties to prevent NPE [gravitino]
Posted by "mxnzx (via GitHub)" <gi...@apache.org>.
mxnzx commented on PR #8263:
URL: https://github.com/apache/gravitino/pull/8263#issuecomment-3220660746
@justinmclean Thanks for the quick review!
Glad that my first OSS contribution was merged into Gravitino.
Hope to contribute more soon!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org