Skip to content

Conversation

@alzimmermsft
Copy link
Member

@alzimmermsft alzimmermsft commented Feb 16, 2023

Description

Fixes #33405
Fixes #33458
Fixes #33525

Adds two utility APIs request in azure-core.

  • CoreUtils.bytesToHexString(byte[], boolean) which converts a byte[] into a hex string.
  • Updates HttpLoggingPolicy to log headers when INFORMATIONAL logging is enabled.
  • CoreUtils.extractSizeFromContentRange(String) which extracts the size segment of a Content-Range header.
  • Fixes a bug where TestUtils.assertArraysEqual was accidentally a recursive call when arrays weren't equal instead of calling Assertion.assertArrayEquals for a better exception message.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Azure.Core azure-core labels Feb 16, 2023
@alzimmermsft alzimmermsft self-assigned this Feb 16, 2023
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-core

Copy link
Member

@vcolin7 vcolin7 left a comment

Choose a reason for hiding this comment

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

Everything LGTM, I just had a question: Is there a particular reason we removed String.format from most methods in AuthorizationChallengeHandler.java?

@alzimmermsft
Copy link
Member Author

Everything LGTM, I just had a question: Is there a particular reason we removed String.format from most methods in AuthorizationChallengeHandler.java?

String.format is relatively expensive as it needs to scan the format string each time it's called (not sure is JIT cleans this up). Since these are simple string concatenations that isn't needed.

@alzimmermsft alzimmermsft merged commit bc5ee75 into Azure:main Feb 17, 2023
@alzimmermsft alzimmermsft deleted the AzCore_MiscellaneousApis branch February 17, 2023 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core azure-core Client This issue points to a problem in the data-plane of the library.

Projects

None yet

5 participants