tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14993] New: - Possible obselete synchronized declaration
Date Mon, 02 Dec 2002 13:55:10 GMT
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=14993>.
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=14993

Possible obselete synchronized declaration

           Summary: Possible obselete synchronized declaration
           Product: Tomcat 4
           Version: 4.1.9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: lennart.benoot@assutech.be


I was looking at the class org.apache.catalina.session.ManagerBase where i noticed the 
method
    public synchronized Random getRandom() {

        if (this.random == null) {
            
synchronized (this) {
                if (this.random == null) { .....

Isn't the synchronozed in the 
method definition obselete and harmful for performance?

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message