From 24d9795fdf3beafa832822d7d1f81bd32ada0e9b Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Sat, 6 Dec 2008 13:37:59 +0000 Subject: [PATCH] Remove unnecessary casts git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@723981 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/http/localserver/RandomHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java b/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java index d0e9f8ddc..57f8d6ba1 100644 --- a/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java +++ b/module-client/src/test/java/org/apache/http/localserver/RandomHandler.java @@ -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);