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

Avoid unnecessary calls to String copy constructor #14

Merged
merged 2 commits into from
Dec 1, 2016
Merged

Avoid unnecessary calls to String copy constructor #14

merged 2 commits into from
Dec 1, 2016

Conversation

marschall
Copy link
Contributor

The driver currently contains 20 calls to the String(String) copy
constructor. To quote from the Javadoc

Unless an explicit copy of {@code original} is needed, use of this
constructor is unnecessary since Strings are immutable.

Calling the constructor only results in unnecessary pressure of both
the allocator and the heap.

The driver currently contains 20 calls to the String(String) copy
constructor. To quote from the Javadoc

> Unless an explicit copy of {@code original} is needed, use of this
> constructor is unnecessary since Strings are immutable.

Calling the constructor only results in unnecessary pressure of both
the allocator and the heap.
@YoungGah YoungGah added Under Review Used for pull requests under review under testing labels Nov 22, 2016
Copy link

@YoungGah YoungGah left a comment

Choose a reason for hiding this comment

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

Looks good

…ring-copy-constructor

# Conflicts:
#	src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java
#	src/main/java/com/microsoft/sqlserver/jdbc/dtv.java
@Suraiya-Hameed Suraiya-Hameed merged commit ab18af1 into microsoft:dev Dec 1, 2016
@Suraiya-Hameed
Copy link
Contributor

Thanks for your contribution @marschall

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 24, 2020
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants