jengebr commented on PR #730:
URL: https://github.com/apache/tomcat/pull/730#issuecomment-2145263710

   Thank you, this was very helpful!  I investigated and found:
   1. Your test clearly reproduced the error.  Much appreciated.
   2. internalPath is usually "" (a String of length 0)
   3. I'm uncertain why this issue was discovered several years after the Bloom 
filter was added - I don't see any relevant code changes since the first merge.
   
   Point #3 suggests that either I overlooked a recent change, or this is a 
very extreme edge case.  If this is an extreme edge case, we should consider 
the performance penalty for everybody versus support for the case.
   
   FWIW we can make that performance penalty very small by switching to this 
logic:
   ```
   (internalPath.isEmpty ? path : internalPath() + path)
   ```
   
   For the common case, the only extra work is a length check on a non-null 
String and a branch.  It's not quite free but is pretty cheap.
   


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