tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 11875] New: - AuthenticatorBase accessControl call makes unnecessary allocations
Date Tue, 20 Aug 2002 21:25:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11875>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11875

AuthenticatorBase accessControl call makes unnecessary allocations

           Summary: AuthenticatorBase accessControl call makes unnecessary
                    allocations
           Product: Tomcat 4
           Version: 4.0.4 Final
          Platform: All
        OS/Version: Other
            Status: UNCONFIRMED
          Severity: Minor
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: per@onclave.com
                CC: per@onclave.com


In the function accessControl(), in the block that checks each role to see if 
it's included in the constraint, there no need to get the realm, call 
findAuthRoles() or allocate a new String[] for 'roles' _if_ 
constraint.getAllRoles() is true.

If users declare '*' as the security constraint or declares no security 
constraint (e.g. no access), these calls are made on every request. 

Fixes:
- move test of getAllRoles() above the other calls.

- move call to getRealm() to just above the 'for' loop where it's used.

Per

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message