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

Use StandardCharsets where possible #15

Merged
merged 2 commits into from
Nov 23, 2016
Merged

Use StandardCharsets where possible #15

merged 2 commits into from
Nov 23, 2016

Conversation

marschall
Copy link
Contributor

Since Java 1.7 there is the StandardCharsets class which provides
constants for frequently used Charsets. Using this also allows us to
remove several UnsupportedEncodingException catch blocks.

  • use StandardCharsets in String constructors where possible
  • use StandardCharsets in #getBytes where possible
  • use StandardCharsets instead of Charset.foreName where possible

Since Java 1.7 there is the StandardCharsets class which provides
constants for frequently used Charsets. Using this also allows us to
remove several UnsupportedEncodingException catch blocks.

 * use StandardCharsets in String constructors where possible
 * use StandardCharsets in #getBytes where possible
 * use StandardCharsets instead of Charset.foreName where possible
@YoungGah YoungGah added the Under Review Used for pull requests under review label Nov 22, 2016
Copy link
Contributor

@xiangyushawn xiangyushawn left a comment

Choose a reason for hiding this comment

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

Perfect! @marschall Accepted the PR, thanks for your contribution.

@xiangyushawn xiangyushawn merged commit 5b74f75 into microsoft:dev Nov 23, 2016
rene-ye added a commit that referenced this pull request Mar 6, 2018
lilgreenbird pushed a commit to lilgreenbird/mssql-jdbc that referenced this pull request Aug 25, 2020
@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
Under Review Used for pull requests under review
Projects
MSSQL JDBC
  
Closed/Merged PRs
Development

Successfully merging this pull request may close these issues.

None yet

3 participants