diff --git a/dropwizard/src/main/java/com/example/helloworld/resources/WorldResource.java b/dropwizard/src/main/java/com/example/helloworld/resources/WorldResource.java index 927ce8e751f..47720e46c73 100644 --- a/dropwizard/src/main/java/com/example/helloworld/resources/WorldResource.java +++ b/dropwizard/src/main/java/com/example/helloworld/resources/WorldResource.java @@ -1,4 +1,3 @@ - package com.example.helloworld.resources; import java.util.Random; @@ -35,7 +34,7 @@ public World[] dbTest(@QueryParam("queries") Optional 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; }