Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasaignerrsg committed Apr 3, 2024
1 parent ac38ef1 commit aee03c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1761,11 +1761,11 @@ SQLServerPooledConnection getPooledConnectionParent() {
*/
private List<ReconnectListener> reconnectListeners = new ArrayList<>();

public void registerBeforeReconnectListener(ReconnectListener reconnectListener){
public void registerBeforeReconnectListener(ReconnectListener reconnectListener) {
reconnectListeners.add(reconnectListener);
}

public void removeBeforeReconnectListener(ReconnectListener reconnectListener){
public void removeBeforeReconnectListener(ReconnectListener reconnectListener) {
reconnectListeners.remove(reconnectListener);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ private boolean resetPrepStmtHandle(boolean discardCurrentCacheItem) {
*/
private Vector<CryptoMetadata> cryptoMetaBatch = new Vector<>();

/**
* Listener to clear the {@link SQLServerPreparedStatement#prepStmtHandle} and {@link SQLServerPreparedStatement#cachedPreparedStatementHandle}
* before reconnecting.
*/
/**
* Listener to clear the {@link SQLServerPreparedStatement#prepStmtHandle} and
* {@link SQLServerPreparedStatement#cachedPreparedStatementHandle} before reconnecting.
*/
private ReconnectListener clearPrepStmtHandleOnReconnectListener;

/**
Expand Down Expand Up @@ -3595,10 +3595,10 @@ public void addBatch(String sql) throws SQLServerException {
throw new SQLServerException(this, form.format(msgArgs), null, 0, false);
}

private void clearPrepStmtHandle(){
private void clearPrepStmtHandle() {
prepStmtHandle = 0;
cachedPreparedStatementHandle = null;
if(getStatementLogger().isLoggable(Level.FINER)){
if (getStatementLogger().isLoggable(Level.FINER)) {
getStatementLogger().finer(toString() + " cleared cachedPrepStmtHandle!");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public void testPreparedStatementHandleOfStatementShouldBeCleared() throws SQLEx
try (SQLServerConnection con = (SQLServerConnection) ResiliencyUtils.getConnection(connectionString)) {
int cacheSize = 2;
String query = String.format("/*testPreparedStatementHandleOfStatementShouldBeCleared%s*/SELECT 1; -- ",
UUID.randomUUID().toString());
UUID.randomUUID().toString());

// enable caching
con.setDisableStatementPooling(false);
Expand Down

0 comments on commit aee03c1

Please sign in to comment.