Fix broken IdGeneratorTest
Change-Id: I6d83c3a4248344a25f2d188cf17da8db0efa37d2
This commit is contained in:
@@ -43,11 +43,15 @@ public class IdGenerator {
|
||||
|
||||
/** Produce the next identifier. */
|
||||
public int next() {
|
||||
return mix(salt, gen.getAndIncrement());
|
||||
return mix(gen.getAndIncrement());
|
||||
}
|
||||
|
||||
private static final int salt = 0x9e3779b9;
|
||||
|
||||
static int mix(int in) {
|
||||
return mix(salt, in);
|
||||
}
|
||||
|
||||
/** A very simple bit permutation to mask a simple incrementer. */
|
||||
public static int mix(final int salt, final int in) {
|
||||
short v0 = hi16(in);
|
||||
|
||||
Reference in New Issue
Block a user