You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by se...@apache.org on 2008/12/06 14:37:59 UTC
svn commit: r723981 -
/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java
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);