Title: [909] trunk/core/src/main/java/org/servicemix/jbi/resolver/RandomChoicePolicy.java: SM-202: Cast corrected
Revision
909
Author
gastaldi
Date
2005-11-23 15:09:04 -0500 (Wed, 23 Nov 2005)

Log Message

SM-202: Cast corrected

Modified Paths


Diff

Modified: trunk/core/src/main/java/org/servicemix/jbi/resolver/RandomChoicePolicy.java (908 => 909)

--- trunk/core/src/main/java/org/servicemix/jbi/resolver/RandomChoicePolicy.java	2005-11-23 20:06:21 UTC (rev 908)
+++ trunk/core/src/main/java/org/servicemix/jbi/resolver/RandomChoicePolicy.java	2005-11-23 20:09:04 UTC (rev 909)
@@ -29,7 +29,7 @@
 public class RandomChoicePolicy implements EndpointChooser {
 
     public ServiceEndpoint chooseEndpoint(ServiceEndpoint[] endpoints, ComponentContext context, MessageExchange exchange) {
-        int index = (int) Math.random() * endpoints.length;
+        int index = (int) (Math.random() * endpoints.length);
         return endpoints[index];
     }
 }

Reply via email to