commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38690] New: - [pool] BaseObjectPool closed boolean field needs to be volatile
Date Fri, 17 Feb 2006 00:34:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38690>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38690

           Summary: [pool] BaseObjectPool closed boolean field needs to be
                    volatile
           Product: Commons
           Version: 1.2 Final
          Platform: All
               URL: http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper
                    /pool/trunk/src/java/org/apache/commons/pool/BaseObjectP
                    ool.java?rev=155430&view=markup
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Pool
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: Sandy@McArthur.org


The private field 'closed' in BaseObjectPool needs to be volatile because in a
multi-threaded environment sub-classes that don't synchronize access before
calling isOpen() (or asserOpen()) may not see changes to this value in a timely
manner.

In leu of attaching a patch I'll just show the correct declaration for line 82: 

private volatile boolean closed = false;

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message