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
Add Closeable/AutoCloseable on Database & interface #2990
Conversation
d8b0b98
to
8d2bd34
Compare
8d2bd34
to
f52f1d3
Compare
This PR is related to this Issue #2974 |
@kataggart I need a first review please. |
Please. |
thanks @zorglube it's in the queue to be reviewed. |
It's looking good so far. Both already have close() methods on them, so it makes sense and won't impact the APIs. You added the try with resources to the tests, you can add Besides that, I have a vague hope to someday remove the need for a "close()" interface from Database in general to make that class more about being a "dialect" vs. another layer of a connection. But that is already going to be a large enough change that it would be nice to have Autoclosable on Database for now. |
I'll work on that, then ping you back. |
cbd6627
to
908180b
Compare
@nvoxland : I updated the unit tests. IF it's good for you, do you have any idea of when the code will be merge ? |
…/liquibase into zorglube-2974_Database_Closeable
It looks good, @zorglube . I made it a non-draft release and kicked off a build on it to make sure everything is still all passing. After those finish we have a couple other internal review & test steps but I'd imagine it will be in the next release. We generally shoot for a new release every couple weeks and just had one recently, so I'd guess it will be around then. |
Code review and test results: Things to be aware of:
Things to worry about:
|
liquibase-core/src/main/java/liquibase/database/core/DatabaseUtils.java
Outdated
Show resolved
Hide resolved
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.
- Fix enhances the existing 'close' method in Database and DatabaseConnection to add the ability to use Java
try with resources
. - This PR is "noisy" with a lot of changes that came in from a merge.
- Many changes normalize our usage of the changeset v. change set terminology.
- Many other changes are related to using XSD latest & warning if XSD versions are mismatched.
- Nothing to worry about, just noting that is why the number of changed files is large for a very focused change to the code.
- No additional testing necessary.
APPROVED
Thanks guys! |
Impact
Description
Added the interface
AutoCloseable
to the interfacesDataBase
andDatabaseConnection
, in order to provid the possibility to use Javatry with resources
.