-
Notifications
You must be signed in to change notification settings - Fork 160
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
chore(deps): bump hibernate.version from 6.3.1.Final to 6.6.1.Final #715
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package liquibase.ext.hibernate.database; | ||
|
||
import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; | ||
|
||
import java.sql.Connection; | ||
import java.sql.SQLException; | ||
|
||
/** | ||
* Used by hibernate to ensure no database access is performed. | ||
*/ | ||
class NoOpConnectionProvider implements ConnectionProvider { | ||
|
||
@Override | ||
public Connection getConnection() throws SQLException { | ||
throw new SQLException("No connection"); | ||
} | ||
|
||
@Override | ||
public void closeConnection(Connection conn) throws SQLException { | ||
} | ||
|
||
@Override | ||
public boolean supportsAggressiveRelease() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isUnwrappableAs(Class unwrapType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public <T> T unwrap(Class<T> unwrapType) { | ||
return null; | ||
} | ||
|
||
|
||
public Connection getConnection(String tenantIdentifier) throws SQLException { | ||
return getConnection(); | ||
} | ||
|
||
public Connection getConnection(Object o) throws SQLException { | ||
Check notice Code scanning / CodeQL Confusing overloading of methods Note
Method NoOpConnectionProvider.getConnection(..) could be confused with overloaded method
getConnection Error loading related location Loading Check notice Code scanning / CodeQL Useless parameter Note
The parameter 'o' is never used.
|
||
return getConnection(); | ||
} | ||
|
||
public void releaseConnection(Object tenantIdentifier, Connection connection) throws SQLException { | ||
Check notice Code scanning / CodeQL Confusing overloading of methods Note
Method NoOpConnectionProvider.releaseConnection(..) could be confused with overloaded method
releaseConnection Error loading related location Loading Check notice Code scanning / CodeQL Useless parameter Note
The parameter 'tenantIdentifier' is never used.
Check notice Code scanning / CodeQL Useless parameter Note
The parameter 'connection' is never used.
|
||
|
||
} | ||
|
||
public void releaseConnection(String tenantIdentifier, Connection connection) throws SQLException { | ||
Check notice Code scanning / CodeQL Useless parameter Note
The parameter 'tenantIdentifier' is never used.
Check notice Code scanning / CodeQL Useless parameter Note
The parameter 'connection' is never used.
|
||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package liquibase.ext.hibernate.database; | ||
|
||
import org.hibernate.engine.jdbc.connections.spi.MultiTenantConnectionProvider; | ||
|
||
import java.sql.Connection; | ||
import java.sql.SQLException; | ||
|
||
/** | ||
* Used by hibernate to ensure no database access is performed. | ||
*/ | ||
class NoOpMultiTenantConnectionProvider implements MultiTenantConnectionProvider { | ||
|
||
@Override | ||
public boolean isUnwrappableAs(Class unwrapType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public <T> T unwrap(Class<T> unwrapType) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Connection getAnyConnection() throws SQLException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void releaseAnyConnection(Connection connection) throws SQLException { | ||
|
||
} | ||
|
||
public Connection getConnection(String s) throws SQLException { | ||
Check notice Code scanning / CodeQL Useless parameter Note
The parameter 's' is never used.
|
||
return null; | ||
} | ||
|
||
public void releaseConnection(String s, Connection connection) throws SQLException { | ||
Check notice Code scanning / CodeQL Useless parameter Note
The parameter 's' is never used.
Check notice Code scanning / CodeQL Useless parameter Note
The parameter 'connection' is never used.
|
||
|
||
} | ||
|
||
public Connection getConnection(Object tenantIdentifier) throws SQLException { | ||
Check notice Code scanning / CodeQL Confusing overloading of methods Note
Method NoOpMultiTenantConnectionProvider.getConnection(..) could be confused with overloaded method
getConnection Error loading related location Loading Check notice Code scanning / CodeQL Missing Override annotation Note
This method overrides
MultiTenantConnectionProvider<>.getConnection Error loading related location Loading |
||
return null; | ||
} | ||
|
||
public void releaseConnection(Object tenantIdentifier, Connection connection) throws SQLException { | ||
Check notice Code scanning / CodeQL Confusing overloading of methods Note
Method NoOpMultiTenantConnectionProvider.releaseConnection(..) could be confused with overloaded method
releaseConnection Error loading related location Loading Check notice Code scanning / CodeQL Missing Override annotation Note
This method overrides
MultiTenantConnectionProvider<>.releaseConnection Error loading related location Loading |
||
|
||
} | ||
|
||
@Override | ||
public boolean supportsAggressiveRelease() { | ||
return false; | ||
} | ||
|
||
} |
Check notice
Code scanning / CodeQL
Useless parameter Note