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/02/03 05:42:27 UTC

[GitHub] [pulsar] michaeljmarshall commented on pull request #14090: [Issue 14080] Clean up Cleanup NPEs in ``ServerCnxTest ``

michaeljmarshall commented on pull request #14090:
URL: https://github.com/apache/pulsar/pull/14090#issuecomment-1028622434


   > @michaeljmarshall PTAL :)
   > 
   > I have another idea. We can create some brand new classes that name is `XXXDefaultResources` to return the default value. this way can avoid useless null checks. Let me know what you think. Thanks ~
   
   @mattisonchao - I agree that it feels unfortunate to have to put these extra null checks in classes like this, especially since the `namespaceResources` object is only used in the whole class. Given that the `namespaceResources` class is never going to be `null` in a non-test scenario, we could probably improve the design by implementing a zero valued `NamespaceResources` class. For now, I think this is a good addition.


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