Skip to content

Commit

Permalink
[TEST] adjusted EsTestCase#randomPositiveLong
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Sep 2, 2016
1 parent 746632f commit 7c03f65
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ public static int randomInt() {
}

public static long randomPositiveLong() {
long positiveLong = randomLong();
while (positiveLong == Long.MIN_VALUE) {
positiveLong = randomLong();
}
return Math.abs(positiveLong);
long randomLong;
do {
randomLong = randomLong();
} while (randomLong == Long.MIN_VALUE);
return Math.abs(randomLong);
}

public static float randomFloat() {
Expand Down

0 comments on commit 7c03f65

Please sign in to comment.