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 48551] New: StringCache: Use entrySet() rather than keySet() + get()
Date Fri, 15 Jan 2010 03:23:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48551

           Summary: StringCache: Use entrySet() rather than keySet() +
                    get()
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: sebb@apache.org


Created an attachment (id=24846)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24846)
Replace keySet() + get(key) with entrySet()

Using entrySet() to iterate over a map is faster than using keySet() followed
by get(key).

Sample patch attached.

There are quite a few other examples elsewhere in the Tomcat code.
I can provide patches for those if required.

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message