Skip to content

Commit

Permalink
Make sure the id is between 1 and 10000
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hauer committed Dec 11, 2013
1 parent 8fa2dd3 commit 4048985
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package com.example.helloworld.resources;

import java.util.Random;
Expand Down Expand Up @@ -35,7 +34,7 @@ public World[] dbTest(@QueryParam("queries") Optional<Integer> queries)

for (int i = 0; i < totalQueries; i++)
{
worlds[i] = this.worldDAO.findById((long)random.nextInt(10000)).orNull();
worlds[i] = this.worldDAO.findById((long)(random.nextInt(10000) + 1)).orNull();
}
return worlds;
}
Expand Down

0 comments on commit 4048985

Please sign in to comment.