diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-01-27 08:19:17 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-01-27 08:19:17 +0100 |
commit | c60c8eda6c469854167e625335e360d78d6b4f42 (patch) | |
tree | 77eb3b85cd298891b69f9102c41529bf680a4388 /vdslib | |
parent | ce2849c7dde877da40c81a2370e038812b3831fa (diff) |
Address review
Diffstat (limited to 'vdslib')
-rw-r--r-- | vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java b/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java index 393c7ab7697..accf3942e4d 100644 --- a/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java +++ b/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java @@ -166,9 +166,9 @@ public class Distribution { configure(config); } - private long lastNBits(long value, int n) { - if (n < 0 || n > 64) - throw new IllegalArgumentException("n must be in [0, 64], but was " + n); + private static long lastNBits(long value, int n) { + if (n < 0 || n > 63) + throw new IllegalArgumentException("n must be in [0, 63], but was " + n); return value & ((1L << n) - 1); } |