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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to