Skip to content

Commit

Permalink
[ISSUE #4377]Unnecessary null check before method call (#4378)
Browse files Browse the repository at this point in the history
* Update .travis.yml

Depracated MODERATE noisy mail for [email protected]. Still Failing: #5670 (5.0.0-alpha-static-topic - 5ebc327) @dongeforever

* Updated Notice file to 2022 (#3735)

* Unnecessary_null_check_before_method_call

Co-authored-by: von gosling <[email protected]>
Co-authored-by: ZhangJian He <[email protected]>
Co-authored-by: tigerweili <[email protected]>
  • Loading branch information
4 people authored Jun 6, 2022
1 parent 14042fa commit 7973f9e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ private CompletableFuture<RemotingCommand> asyncSendMessage(ChannelHandlerContex

CompletableFuture<PutMessageResult> putMessageResult = null;
String transFlag = origProps.get(MessageConst.PROPERTY_TRANSACTION_PREPARED);
if (transFlag != null && Boolean.parseBoolean(transFlag)) {
if (Boolean.parseBoolean(transFlag)) {
if (this.brokerController.getBrokerConfig().isRejectTransactionMessage()) {
response.setCode(ResponseCode.NO_PERMISSION);
response.setRemark(
Expand Down Expand Up @@ -445,7 +445,7 @@ private RemotingCommand sendMessage(final ChannelHandlerContext ctx,
PutMessageResult putMessageResult = null;
Map<String, String> oriProps = MessageDecoder.string2messageProperties(requestHeader.getProperties());
String traFlag = oriProps.get(MessageConst.PROPERTY_TRANSACTION_PREPARED);
if (traFlag != null && Boolean.parseBoolean(traFlag)
if (Boolean.parseBoolean(traFlag)
&& !(msgInner.getReconsumeTimes() > 0 && msgInner.getDelayTimeLevel() > 0)) { //For client under version 4.6.1
if (this.brokerController.getBrokerConfig().isRejectTransactionMessage()) {
response.setCode(ResponseCode.NO_PERMISSION);
Expand Down

0 comments on commit 7973f9e

Please sign in to comment.