[grizzly~git:31cd50d2] [2.3.x] Extra checks are probably overkill.

  • From: rlubke@...
  • To: commits@...
  • Subject: [grizzly~git:31cd50d2] [2.3.x] Extra checks are probably overkill.
  • Date: Fri, 1 Feb 2013 21:34:58 +0000

Project:    grizzly
Repository: git
Revision:   31cd50d2588d23ff406601a5bc81808e0eeff7f2
Author:     rlubke
Date:       2013-02-01 21:34:51 UTC
Link:       

Log Message:
------------
[2.3.x] Extra checks are probably overkill.


Revisions:
----------
31cd50d2588d23ff406601a5bc81808e0eeff7f2


Modified Paths:
---------------
modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java


Diffs:
------
diff --git 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java
index aa76228..519bfd4 100644
--- 
a/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java
+++ 
b/modules/grizzly/src/main/java/org/glassfish/grizzly/AbstractTransport.java
@@ -496,9 +496,6 @@ public abstract class AbstractTransport implements 
Transport {
         if (readTimeout <= 0) {
             return -1;
         } else {
-            if (timeUnit == TimeUnit.MILLISECONDS) {
-                return readTimeout;
-            }
             return timeUnit.convert(readTimeout, TimeUnit.MILLISECONDS);
         }
     }
@@ -511,11 +508,7 @@ public abstract class AbstractTransport implements 
Transport {
         if (timeout <= 0) {
             readTimeout = -1;
         } else {
-            if (timeUnit == TimeUnit.MILLISECONDS) {
-                readTimeout = timeout;
-            } else {
-                readTimeout = TimeUnit.MILLISECONDS.convert(timeout, 
timeUnit);
-            }
+             readTimeout = TimeUnit.MILLISECONDS.convert(timeout, timeUnit);
         }
     }
 
@@ -527,9 +520,6 @@ public abstract class AbstractTransport implements 
Transport {
         if (writeTimeout <= 0) {
             return -1;
         } else {
-            if (timeUnit == TimeUnit.MILLISECONDS) {
-                return readTimeout;
-            }
             return timeUnit.convert(writeTimeout, TimeUnit.MILLISECONDS);
         }
     }
@@ -542,11 +532,7 @@ public abstract class AbstractTransport implements 
Transport {
         if (timeout <= 0) {
             writeTimeout = -1;
         } else {
-            if (timeUnit == TimeUnit.MILLISECONDS) {
-                writeTimeout = timeout;
-            } else {
-                writeTimeout = TimeUnit.MILLISECONDS.convert(timeout, 
timeUnit);
-            }
+            writeTimeout = TimeUnit.MILLISECONDS.convert(timeout, timeUnit);
         }
     }




[grizzly~git:31cd50d2] [2.3.x] Extra checks are probably overkill.

rlubke 02/01/2013
Terms of Use; Privacy Policy; Copyright ©2013-2016 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close