Skip to content

Conversation

@zhangbin90
Copy link

Fixes #2318

Summary

This PR introduces fluent-style setters to the HikariConfig class, allowing for a more readable and concise configuration setup. The new setters enable chaining multiple properties without repeating the variable name, enhancing the overall developer experience.

Testing

Ran all unit tests using ./mvn test and verified the log no longer appears.

Please review and let me know if any changes are needed.

brettwooldridge and others added 22 commits March 25, 2025 02:25
…n jar back in the day. It was causing .class files to be included in the sources jar. (brettwooldridge#2315)
…on chaining

This commit introduces fluent-style setters to the HikariConfig class, allowing for a more readable and concise configuration setup. The new setters enable chaining multiple properties without repeating the variable name, enhancing the overall developer experience.

Closes brettwooldridge#2318
@brettwooldridge brettwooldridge force-pushed the dev branch 3 times, most recently from d7a9b2f to e56fa46 Compare July 20, 2025 16:24
@brettwooldridge
Copy link
Owner

There is no way to do this in a backwards compatible way. In Java, the return type is not part of the method signature. Therefore, these two methods cannot coexist:

public void setCatalog(String catalog);

public HikariConfig setCatalog(String catalog);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make HikariConfig setters chainable

4 participants