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 explicit types with <> (The diamond operator). #468

Merged
merged 5 commits into from
Aug 31, 2017

Conversation

peterbae
Copy link
Contributor

solved conflict in #420

JamieMagee and others added 5 commits July 31, 2017 14:40
This removes duplicated information when instantiating variables, and increases the readability. For example:

```Java
EnumMap<CallableHandles, HandleAssociation> handleMap =
      new EnumMap<CallableHandles, HandleAssociation>(CallableHandles.class);
```

becomes

```Java
EnumMap<CallableHandles, HandleAssociation> handleMap =
            new EnumMap<>(CallableHandles.class);
```

and

```Java
private static final EnumMap<SSType.Category, EnumSet<JDBCType.Category>> conversionMap =
            new EnumMap<SSType.Category, EnumSet<JDBCType.Category>>(SSType.Category.class);
```

becomes

```Java
private static final EnumMap<SSType.Category, EnumSet<JDBCType.Category>> conversionMap =
                new EnumMap<>(SSType.Category.class);
```
@msftclas
Copy link

@peterbae,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@codecov-io
Copy link

codecov-io commented Aug 31, 2017

Codecov Report

Merging #468 into dev will increase coverage by 0.13%.
The diff coverage is 76.36%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #468      +/-   ##
============================================
+ Coverage     46.16%   46.29%   +0.13%     
- Complexity     2193     2200       +7     
============================================
  Files           108      108              
  Lines         25227    25227              
  Branches       4172     4172              
============================================
+ Hits          11645    11679      +34     
+ Misses        11563    11519      -44     
- Partials       2019     2029      +10
Flag Coverage Δ Complexity Δ
#JDBC41 46.12% <76.36%> (+0.13%) 2187 <10> (+6) ⬆️
#JDBC42 46.06% <76.36%> (ø) 2195 <10> (+3) ⬆️
Impacted Files Coverage Δ Complexity Δ
...om/microsoft/sqlserver/jdbc/JaasConfiguration.java 0% <0%> (ø) 0 <0> (ø) ⬇️
.../microsoft/sqlserver/jdbc/SQLServerXAResource.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...com/microsoft/sqlserver/jdbc/dns/DNSUtilities.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 50.82% <100%> (ø) 161 <0> (ø) ⬇️
...va/com/microsoft/sqlserver/jdbc/SQLServerClob.java 28.26% <100%> (ø) 4 <0> (ø) ⬇️
...ava/com/microsoft/sqlserver/jdbc/SQLCollation.java 92.53% <100%> (ø) 14 <3> (ø) ⬇️
...microsoft/sqlserver/jdbc/FailOverMapSingleton.java 12.9% <100%> (ø) 0 <0> (ø) ⬇️
...oft/sqlserver/jdbc/SQLServerCallableStatement.java 29.19% <100%> (ø) 90 <0> (ø) ⬇️
...oft/sqlserver/jdbc/SQLServerSymmetricKeyCache.java 57.53% <100%> (ø) 5 <0> (ø) ⬇️
...soft/sqlserver/jdbc/SQLServerDatabaseMetaData.java 29.7% <100%> (ø) 49 <1> (ø) ⬇️
... and 22 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 2e87201...4e66654. Read the comment docs.

@peterbae peterbae merged commit 5a13577 into microsoft:dev Aug 31, 2017
@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

4 participants