[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3656) Eliminate unnecessary String concat in PageContext

Michael Youngstrom (JIRA) jira-events at lists.jboss.org
Thu Oct 30 17:37:20 EDT 2008


Eliminate unnecessary String concat in PageContext
--------------------------------------------------

                 Key: JBSEAM-3656
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3656
             Project: Seam
          Issue Type: Bug
          Components: Core
            Reporter: Michael Youngstrom
            Assignee: Michael Youngstrom
             Fix For: 2.1.1.CR1


PageContext has an unnecessary string concat that would normally be harmless but  when done thousands of times a request becomes a bigger problem.  Here is the patch:


Index: src/main/org/jboss/seam/contexts/PageContext.java
===================================================================
--- src/main/org/jboss/seam/contexts/PageContext.java	(revision 9465)
+++ src/main/org/jboss/seam/contexts/PageContext.java	(working copy)
@@ -38,6 +38,7 @@
 public class PageContext implements Context 
 {
 
+   private static final String PAGE_CONTEXT_PREFIX = ScopeType.PAGE.getPrefix() + '$';
    private Map<String, Object> previousPageMap;
    private Map<String, Object> nextPageMap;
    
@@ -59,7 +60,7 @@
 
    private String getPrefix()
    {
-      return ScopeType.PAGE.getPrefix() + '$';
+      return PAGE_CONTEXT_PREFIX;
    }
 
 	public Object get(String name) 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list