Author: chirino
Date: Thu Feb 21 15:42:00 2008
New Revision: 630050

URL: http://svn.apache.org/viewvc?rev=630050&view=rev
Log:
Fixing bug with qdox.

Modified:
    
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java

Modified: 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
URL: 
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java?rev=630050&r1=630049&r2=630050&view=diff
==============================================================================
--- 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
 (original)
+++ 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
 Thu Feb 21 15:42:00 2008
@@ -75,7 +75,7 @@
             // read checks to be small..
             
             // If less than 90% of the read check Time elapsed then abort this 
readcheck. 
-            if( elapsed < (readCheckTime * 9 / 10) ) {
+            if( !allowReadCheck(elapsed) ) { // FUNKY qdox bug does not allow 
me to inline this expression.
                 LOG.debug("Aborting read check.. Not enough time elapsed since 
last read check.");
                 return;
             }
@@ -84,6 +84,10 @@
             readCheck();
         }
     };
+    
+    private boolean allowReadCheck(long elapsed) {
+        return elapsed > (readCheckTime * 9 / 10);
+    }
 
     private final Runnable writeChecker = new Runnable() {
         long lastRunTime;


Reply via email to