You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2003/05/21 16:59:03 UTC

DO NOT REPLY [Bug 20116] New: - Java Date formats are not synchronised i.e. not threadsafe

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=20116>.
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=20116

Java Date formats are not synchronised i.e. not threadsafe

           Summary: Java Date formats are not synchronised i.e. not
                    threadsafe
           Product: JMeter
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: jkb@stian.freeserve.co.uk


Just learnt from a colleague that the Date formats are not synchronised. 

A quick scan of JMeter (LATEST) found a couple of classes using DateFormat: 
SaveService and CookieManager.

I presume SaveService will not be run in multiple threads, but the 
CookieManager will be, so could presumably be affected by this "feature" - 
especially as CookieManager creates a static date format.

The 1.4.1. JavaDoc suggests that one should create a separate format for each 
thread, or synchronise access to the format.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org