Repository: cassandra Updated Branches: refs/heads/trunk d919cc998 -> b274aa1c7
use short-circuiting ops Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b274aa1c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b274aa1c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b274aa1c Branch: refs/heads/trunk Commit: b274aa1c7f9332205b4753de6c765a3c5e1f1ef8 Parents: d919cc9 Author: Dave Brosius <dbros...@mebigfatguy.com> Authored: Sun Mar 15 19:20:01 2015 -0400 Committer: Dave Brosius <dbros...@mebigfatguy.com> Committed: Sun Mar 15 19:20:01 2015 -0400 ---------------------------------------------------------------------- .../cassandra/stress/generate/DistributionBoundApache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b274aa1c/tools/stress/src/org/apache/cassandra/stress/generate/DistributionBoundApache.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/generate/DistributionBoundApache.java b/tools/stress/src/org/apache/cassandra/stress/generate/DistributionBoundApache.java index 23ce3e9..db077a5 100644 --- a/tools/stress/src/org/apache/cassandra/stress/generate/DistributionBoundApache.java +++ b/tools/stress/src/org/apache/cassandra/stress/generate/DistributionBoundApache.java @@ -61,7 +61,7 @@ public class DistributionBoundApache extends Distribution private static long bound(long min, long max, double val) { long r = (long) val; - if ((r >= min) & (r <= max)) + if ((r >= min) && (r <= max)) return r; if (r < min) return min; @@ -72,7 +72,7 @@ public class DistributionBoundApache extends Distribution private static double boundDouble(long min, long max, double r) { - if ((r >= min) & (r <= max)) + if ((r >= min) && (r <= max)) return r; if (r < min) return min;