You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/01 06:42:41 UTC

[GitHub] [pulsar] HQebupt opened a new pull request #14979: [fix][transaction]fix potential NPE in TransactionBufferDisable

HQebupt opened a new pull request #14979:
URL: https://github.com/apache/pulsar/pull/14979


   ### Motivation
   ```java
   public CompletableFuture<TransactionMeta> getTransactionMeta(TxnID txnID) {
           return null;
       }
   ``` 
   The return value null may cause potential NPE in ` getTransactionMeta`.  The method does the similar:CompletableFuture<Void> purgeTxns(List<Long> dataLedgers)`.
   
   ### Modifications
   
   Use ` return CompletableFuture.completedFuture(null);` instead of `return null;`
   
   ### Verifying this change
   
   Make sure that the change passes the CI checks.
   
   ### Does this pull request potentially affect one of the following parts:
   
   If `yes` was chosen, please highlight the changes
   
   - Dependencies (does it add or upgrade a dependency): (no)
   - The public API: (no)
   - The schema: (no)
   - The default values of configurations: (no)
   - The wire protocol: (no)
   - The rest endpoints: (no)
   - The admin cli options: (no)
   - Anything that affects deployment: (no)
   
   ### Documentation
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   - [x] `no-need-doc` 
   


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] HQebupt commented on pull request #14979: [fix][transaction]fix potential NPE in TransactionBufferDisable

Posted by GitBox <gi...@apache.org>.
HQebupt commented on pull request #14979:
URL: https://github.com/apache/pulsar/pull/14979#issuecomment-1085610095


   /pulsarbot run-failure-checks


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org