https://issues.apache.org/bugzilla/show_bug.cgi?id=51953

--- Comment #7 from Christopher Schultz <ch...@christopherschultz.net> 
2011-10-04 21:15:43 UTC ---
This code is executed unconditionally:

"
final InetAddress addr = InetAddress.getByName(property);

for (final NetMask nm: deny)
     if (nm.matches(addr))
"

NetMask.matches does a new BigInteger().shiftRight (though the shift should be
0 bytes, and so should be pretty quick).

Remember that this code may be executed for every request, include, and
forward, so you'd better take every opportunity to reduce the amount of time
required to run it.

In terms of making it more generic, what I meant was that you would be able to
quickly match exact-matches (using a simple String.equals) and only do the
extra work when there was a netmask to actually check.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

Reply via email to