You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "nikam14 (via GitHub)" <gi...@apache.org> on 2023/05/11 09:10:49 UTC
[GitHub] [rocketmq] nikam14 opened a new pull request, #6735: [MINOR][Enhancement]Used string.format() instead of '+' operator concatenation.
nikam14 opened a new pull request, #6735:
URL: https://github.com/apache/rocketmq/pull/6735
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### This PR do not Fixe issue
<!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
### Brief Description
It is more suitable to use String.format() instead of '+' operator.
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
<!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] nikam14 commented on pull request #6735: [MINOR][Enhancement]Used string.format() instead of '+' operator concatenation.
Posted by "nikam14 (via GitHub)" <gi...@apache.org>.
nikam14 commented on PR #6735:
URL: https://github.com/apache/rocketmq/pull/6735#issuecomment-1545238577
Usage of String.format() method is slowing down the code as compare to the + operator concatenation.
I think closing the pr is good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] ferrirW commented on a diff in pull request #6735: [MINOR][Enhancement]Used string.format() instead of '+' operator concatenation.
Posted by "ferrirW (via GitHub)" <gi...@apache.org>.
ferrirW commented on code in PR #6735:
URL: https://github.com/apache/rocketmq/pull/6735#discussion_r1193391972
##########
acl/src/main/java/org/apache/rocketmq/acl/common/AuthorizationHeader.java:
##########
@@ -51,14 +51,14 @@ public AuthorizationHeader(String header) throws DecoderException {
String[] kv = keyValue.trim().split("=", 2);
int kvLength = kv.length;
if (kv.length != AUTH_HEADER_KV_LENGTH) {
- throw new DecoderException("authorization keyValues length is incorrect, actual length=" + kvLength);
Review Comment:
In my tests, + is much faster, so why change this here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] nikam14 closed pull request #6735: [MINOR][Enhancement]Used string.format() instead of '+' operator concatenation.
Posted by "nikam14 (via GitHub)" <gi...@apache.org>.
nikam14 closed pull request #6735: [MINOR][Enhancement]Used string.format() instead of '+' operator concatenation.
URL: https://github.com/apache/rocketmq/pull/6735
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] codecov-commenter commented on pull request #6735: [MINOR][Enhancement]Used string.format() instead of '+' operator concatenation.
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6735:
URL: https://github.com/apache/rocketmq/pull/6735#issuecomment-1543668875
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/6735?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#6735](https://app.codecov.io/gh/apache/rocketmq/pull/6735?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bb47843) into [develop](https://app.codecov.io/gh/apache/rocketmq/commit/5dc2e20efc9866f0f9d4f242d41ad4b4cfc65644?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5dc2e20) will **decrease** coverage by `0.07%`.
> The diff coverage is `0.00%`.
```diff
@@ Coverage Diff @@
## develop #6735 +/- ##
=============================================
- Coverage 42.89% 42.82% -0.07%
+ Complexity 9009 8993 -16
=============================================
Files 1113 1113
Lines 78603 78603
Branches 10226 10226
=============================================
- Hits 33713 33661 -52
- Misses 40670 40720 +50
- Partials 4220 4222 +2
```
| [Impacted Files](https://app.codecov.io/gh/apache/rocketmq/pull/6735?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/rocketmq/acl/common/AuthorizationHeader.java](https://app.codecov.io/gh/apache/rocketmq/pull/6735?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWNsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9hY2wvY29tbW9uL0F1dGhvcml6YXRpb25IZWFkZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
... and [31 files with indirect coverage changes](https://app.codecov.io/gh/apache/rocketmq/pull/6735/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] caigy commented on pull request #6735: [MINOR][Enhancement]Used string.format() instead of '+' operator concatenation.
Posted by "caigy (via GitHub)" <gi...@apache.org>.
caigy commented on PR #6735:
URL: https://github.com/apache/rocketmq/pull/6735#issuecomment-1543640118
What's the benefit of this modification?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org