Remove unnecessary casts

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@723981 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2008-12-06 13:37:59 +00:00
parent c6769986be
commit 24d9795fdf
1 changed files with 3 additions and 3 deletions

View File

@ -165,7 +165,7 @@ public class RandomHandler
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 @@ public class RandomHandler
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);