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

Fix redundant creation of MemoryStream #441

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

Pliner
Copy link
Contributor

@Pliner Pliner commented Sep 4, 2018

Proposed Changes

There are two unnecessary allocations of MemoryStream in constructors of Command class, because they invoke another constructor which sets m_body field.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

@pivotal-issuemaster
Copy link

@Pliner Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@Pliner Thank you for signing the Contributor License Agreement!

@kjnilsson
Copy link
Contributor

Thank you. Good catch.

@kjnilsson kjnilsson merged commit 8734f8f into rabbitmq:master Sep 4, 2018
@michaelklishin michaelklishin mentioned this pull request Sep 4, 2018
11 tasks
@michaelklishin michaelklishin added this to the 5.2.0 milestone Sep 19, 2018
@Pliner Pliner deleted the fix-command-constructors branch December 2, 2022 22:07
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.

None yet

4 participants