markt-asf commented on PR #660:
URL: https://github.com/apache/tomcat/pull/660#issuecomment-1707256734

   Saving a single function call is unlikely to make any difference. I'd expect 
the compiler to optimise that.
   
   Changes that reduce duplication and/or improve the readability of the code 
are the ones that are most likely to be applied. If there is a trade-off 
between duplication and readability, the priority will nearly always be 
readability.
   
   In this instance I think you'd be better keeping the null check for context 
in the static method. That further reduces duplication and has the benefit that 
all of the logic is then in a single place and the code would more clearly 
follow the priority order documented in the code.


-- 
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: dev-unsubscr...@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to