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

           Summary: JspRuntimeContext synch. problems.
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: s...@apache.org


JspRuntimeContext.jspReloadCount is synchronised when updated, but not when
read by getJspReloadCount().

If the instance is accessed from multiple threads, then the returned value may
not be the current value, it could be arbitrarily stale.

If this is acceptable, then the Javadoc should say so; otherwise the getter
needs to be synch. (or the field needs to be volatile) Or just use
AtomicInteger.

==

Various other fields are neither final nor synchronized, e.g.

classpath
codeSource
etc.

As far as I can tell, these could easily be made final as they are only written
by the constructor.

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