You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/09/20 03:25:48 UTC

DO NOT REPLY [Bug 12841] New: - GenericObjectPool unused variable and unused synchronized block

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

GenericObjectPool unused variable and unused synchronized block

           Summary: GenericObjectPool unused variable and unused
                    synchronized block
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Pool
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: rleland@apache.org


In Evictor.run()
First off sleeptime is never used.
Secondly I see no reason for a syncronized block here,
even if sleeptime was used.

   long sleeptime = 0L;
   synchronized(GenericObjectPool.this) {
      sleeptime = _timeBetweenEvictionRunsMillis;
   }
   try {
      Thread.currentThread().sleep(_timeBetweenEvictionRunsMillis);
   } catch(Exception e) {
       ; // ignored
   }

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>