You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/01/15 04:23:44 UTC

DO NOT REPLY [Bug 48551] New: StringCache: Use entrySet() rather than keySet() + get()

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


DO NOT REPLY [Bug 48551] StringCache: Use entrySet() rather than keySet() + get()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48551

--- Comment #1 from Sebb <se...@apache.org> 2010-01-15 11:57:02 UTC ---
Created an attachment (id=24849)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24849)
Replace keySet() + get(key) with entrySet()

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


DO NOT REPLY [Bug 48551] StringCache: Use entrySet() rather than keySet() + get()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48551

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Mark Thomas <ma...@apache.org> 2010-02-02 09:21:16 GMT ---
Patch applied. Many thanks.

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


DO NOT REPLY [Bug 48551] StringCache: Use entrySet() rather than keySet() + get()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48551

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24846|application/octet-stream    |text/plain
          mime type|                            |
  Attachment #24846|0                           |1
           is patch|                            |

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