You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "majialoong (via GitHub)" <gi...@apache.org> on 2025/11/04 16:17:26 UTC

[I] [Enhancement] Fix NPE in getAcl when subject is null [rocketmq]

majialoong opened a new issue, #9809:
URL: https://github.com/apache/rocketmq/issues/9809

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature.
   
   
   ### Summary
   
   When the getAcl method receives a null subject (for example, due to incorrect user input or a non-existent subjectType), it currently returns a raw NPE error message. This is not user-friendly. We should avoid NPE and provide a clear, helpful error message instead.
   
   <img width="1818" height="222" alt="Image" src="https://github.com/user-attachments/assets/8661acb0-911f-4c37-83e7-03b62c88f99c" />
   
   ### Motivation
   
   Avoid returning raw NPE error messages directly.
   
   ### Describe the Solution You'd Like
   
   Check whether the subject is null and handle the exception accordingly.This is also similar to other methods in `AuthorizationMetadataManagerImpl`, such as `createAcl` and `updateAcl`.
   
   The improved message prompt is as follows:
   
   <img width="833" height="178" alt="Image" src="https://github.com/user-attachments/assets/f557e26b-e08e-4748-835a-01fe66772967" />
   
   ### Describe Alternatives You've Considered
   
   No
   
   ### Additional Context
   
   _No response_


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

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


Re: [I] [Enhancement] Fix NPE in getAcl when subject is null [rocketmq]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin closed issue #9809: [Enhancement] Fix NPE in getAcl when subject is null
URL: https://github.com/apache/rocketmq/issues/9809


-- 
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