You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by "github-code-scanning[bot] (via GitHub)" <gi...@apache.org> on 2023/09/09 21:36:26 UTC
[GitHub] [incubator-baremaps] github-code-scanning[bot] commented on a diff in pull request #777: Add a datasource object to the tileset
github-code-scanning[bot] commented on code in PR #777:
URL: https://github.com/apache/incubator-baremaps/pull/777#discussion_r1320656666
##########
baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java:
##########
@@ -45,11 +48,20 @@
* Creates a data source from a JDBC url with a pool size corresponding to the number of available
* processors.
*
- * @param url the JDBC url
+ * @param database the database object, either a JDBC url or a {@code DataSource}
* @return the data source
*/
- public static DataSource createDataSource(String url) {
- return createDataSource(url, Runtime.getRuntime().availableProcessors() * 2);
+ public static DataSource createDataSource(Object database) {
Review Comment:
## Confusing overloading of methods
Method PostgresUtils.createDataSource(..) could be confused with overloaded method [createDataSource](1), since dispatch depends on static types.
Method PostgresUtils.createDataSource(..) could be confused with overloaded method [createDataSource](2), since dispatch depends on static types.
[Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/801)
--
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@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org