Skip to content
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

Replace for and while loops with foeach loops #421

Merged
merged 1 commit into from Aug 31, 2017

Conversation

JamieMagee
Copy link
Member

This increases the overall readability of the code, and has been supported since Java 5.

This increases the overall readability of the code, and has been supported since Java 5.
@codecov-io
Copy link

codecov-io commented Jul 31, 2017

Codecov Report

Merging #421 into dev will increase coverage by 0.08%.
The diff coverage is 47.05%.

Impacted file tree graph

@@             Coverage Diff             @@
##                dev    #421      +/-   ##
===========================================
+ Coverage     45.92%     46%   +0.08%     
- Complexity     2198    2203       +5     
===========================================
  Files           108     108              
  Lines         25210   25193      -17     
  Branches       4164    4164              
===========================================
+ Hits          11577   11591      +14     
+ Misses        11711   11677      -34     
- Partials       1922    1925       +3
Flag Coverage Δ Complexity Δ
#JDBC41 45.72% <47.05%> (+0.04%) 2186 <1> (+1) ⬆️
#JDBC42 45.83% <47.05%> (+0.02%) 2195 <1> (+3) ⬆️
Impacted Files Coverage Δ Complexity Δ
...l/googlecode/concurrentlinkedhashmap/Weighers.java 8.51% <0%> (ø) 1 <0> (ø) ⬇️
...ava/com/microsoft/sqlserver/jdbc/KerbCallback.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 60.04% <0%> (ø) 91 <0> (ø) ⬇️
...va/com/microsoft/sqlserver/jdbc/StreamColInfo.java 78.26% <100%> (-0.91%) 6 <0> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerException.java 76.85% <100%> (-0.38%) 29 <0> (ø)
...va/com/microsoft/sqlserver/jdbc/StreamTabName.java 85% <100%> (-0.72%) 7 <0> (ø)
...oft/sqlserver/jdbc/SQLServerBulkCSVFileRecord.java 41.63% <14.28%> (-0.5%) 28 <0> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 33.14% <20%> (-0.01%) 252 <1> (+1)
...rc/main/java/com/microsoft/sqlserver/jdbc/TVP.java 45.18% <25%> (-0.08%) 27 <0> (ø)
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 49.91% <50%> (+0.25%) 163 <0> (ø) ⬇️
... and 14 more

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 7741ee9...7b7275b. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Jul 31, 2017

Codecov Report

Merging #421 into dev will increase coverage by 0.08%.
The diff coverage is 47.05%.

Impacted file tree graph

@@             Coverage Diff             @@
##                dev    #421      +/-   ##
===========================================
+ Coverage     45.92%     46%   +0.08%     
- Complexity     2198    2203       +5     
===========================================
  Files           108     108              
  Lines         25210   25193      -17     
  Branches       4164    4164              
===========================================
+ Hits          11577   11591      +14     
+ Misses        11711   11677      -34     
- Partials       1922    1925       +3
Flag Coverage Δ Complexity Δ
#JDBC41 45.72% <47.05%> (+0.04%) 2186 <1> (+1) ⬆️
#JDBC42 45.83% <47.05%> (+0.02%) 2195 <1> (+3) ⬆️
Impacted Files Coverage Δ Complexity Δ
...ava/com/microsoft/sqlserver/jdbc/KerbCallback.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 60.04% <0%> (ø) 91 <0> (ø) ⬇️
...l/googlecode/concurrentlinkedhashmap/Weighers.java 8.51% <0%> (ø) 1 <0> (ø) ⬇️
...m/microsoft/sqlserver/jdbc/SQLServerException.java 76.85% <100%> (-0.38%) 29 <0> (ø)
...va/com/microsoft/sqlserver/jdbc/StreamTabName.java 85% <100%> (-0.72%) 7 <0> (ø)
...va/com/microsoft/sqlserver/jdbc/StreamColInfo.java 78.26% <100%> (-0.91%) 6 <0> (ø)
...oft/sqlserver/jdbc/SQLServerBulkCSVFileRecord.java 41.63% <14.28%> (-0.5%) 28 <0> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 33.14% <20%> (-0.01%) 252 <1> (+1)
...rc/main/java/com/microsoft/sqlserver/jdbc/TVP.java 45.18% <25%> (-0.08%) 27 <0> (ø)
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 49.91% <50%> (+0.25%) 163 <0> (ø) ⬇️
... and 14 more

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 7741ee9...7b7275b. Read the comment docs.

Copy link
Member

@cheenamalhotra cheenamalhotra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ForEach loops are ideally more efficient way of performing iterations. I don't see any issues with these changes. We shall merge this PR soon.

@cheenamalhotra cheenamalhotra added this to the 6.3.2 milestone Aug 24, 2017
@JamieMagee
Copy link
Member Author

@cheenamalhotra Thanks for the review. Is it possible to merge this now?

@ajlam
Copy link
Member

ajlam commented Aug 30, 2017

Hi @JamieMagee, we'll merge your two PRs with the next preview release (v6.3.2).

@peterbae
Copy link
Contributor

Testing was good, merging in.

@peterbae peterbae merged commit 2e87201 into microsoft:dev Aug 31, 2017
@JamieMagee JamieMagee deleted the foreach branch September 1, 2017 09:27
@lilgreenbird lilgreenbird added this to Closed/Merged PRs in MSSQL JDBC Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
MSSQL JDBC
  
Closed/Merged PRs
Development

Successfully merging this pull request may close these issues.

None yet

6 participants