Skip to content

Fix | Fix SQLServerConnection.abort() API behavior to clear resources consistently#983

Merged
cheenamalhotra merged 4 commits intomicrosoft:devfrom
cheenamalhotra:connectionAbort
Mar 13, 2019
Merged

Fix | Fix SQLServerConnection.abort() API behavior to clear resources consistently#983
cheenamalhotra merged 4 commits intomicrosoft:devfrom
cheenamalhotra:connectionAbort

Conversation

@cheenamalhotra
Copy link
Copy Markdown
Member

As per Java Specifications, executing Connection.abort(Executor executor), must also release all resources and mark the connection closed as Connection.close() would.

The PR fixes the same by managing resource cleanup separately in a common internal method.

@cheenamalhotra cheenamalhotra added this to the 7.3.0 milestone Mar 12, 2019
@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 12, 2019

Codecov Report

Merging #983 into dev will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##                dev    #983      +/-   ##
===========================================
- Coverage     50.61%   50.6%   -0.02%     
+ Complexity     2921    2920       -1     
===========================================
  Files           120     120              
  Lines         27996   27995       -1     
  Branches       4681    4677       -4     
===========================================
- Hits          14170   14166       -4     
- Misses        11530   11535       +5     
+ Partials       2296    2294       -2
Flag Coverage Δ Complexity Δ
#JDBC42 50.11% <100%> (-0.04%) 2877 <6> (-1)
#JDBC43 50.5% <100%> (+0.01%) 2913 <6> (-3) ⬇️
Impacted Files Coverage Δ Complexity Δ
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 46.48% <100%> (+0.05%) 343 <6> (+1) ⬆️
...a/com/microsoft/sqlserver/jdbc/PLPInputStream.java 58.57% <0%> (-1.19%) 33% <0%> (-1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 46.86% <0%> (-0.44%) 111% <0%> (-1%)
...n/java/com/microsoft/sqlserver/jdbc/Parameter.java 67.13% <0%> (-0.21%) 64% <0%> (ø)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 55.61% <0%> (-0.14%) 0% <0%> (ø)
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 39% <0%> (+0.43%) 43% <0%> (ø) ⬇️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 62.5% <0%> (+0.43%) 91% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78efb57...9dbda5f. Read the comment docs.

peterbae
peterbae previously approved these changes Mar 12, 2019
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
@cheenamalhotra cheenamalhotra merged commit 408b614 into microsoft:dev Mar 13, 2019
@cheenamalhotra cheenamalhotra deleted the connectionAbort branch March 14, 2019 19:15
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.

6 participants