hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r723981 - /httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java
Date Sat, 06 Dec 2008 13:37:59 GMT
Author: sebb
Date: Sat Dec  6 05:37:59 2008
New Revision: 723981

URL: http://svn.apache.org/viewvc?rev=723981&view=rev
Log:
Remove unnecessary casts

Modified:
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java

Modified: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java?rev=723981&r1=723980&r2=723981&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java
Sat Dec  6 05:37:59 2008
@@ -165,7 +165,7 @@
             if (len < 0L)
                 throw new IllegalArgumentException
                     ("Length must not be negative");
-            if (len > (long) Integer.MAX_VALUE)
+            if (len > Integer.MAX_VALUE)
                 throw new IllegalArgumentException
                     ("Length must not exceed Integer.MAX_VALUE");
 
@@ -233,9 +233,9 @@
                     if (i%5 == 0) {
                         value = Math.random();
                     }
-                    value = value * (double)RANGE.length;
+                    value = value * RANGE.length;
                     int d = (int) value;
-                    value = value - (double)d;
+                    value = value - d;
                     data[i] = RANGE[d];
                 }
                 out.write(data, 0, end);



Mime
View raw message