Pārlūkot izejas kodu

Left the important '+1' off the random number.

Brian Hauer 12 gadi atpakaļ
vecāks
revīzija
0f39cb94ac
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      gemini/Source/hello/home/handler/HelloHandler.java

+ 1 - 1
gemini/Source/hello/home/handler/HelloHandler.java

@@ -47,7 +47,7 @@ public class HelloHandler
   @PathSegment
   public boolean db()
   {
-    return json(store.get(World.class, ThreadLocalRandom.current().nextInt(DB_ROWS)));
+    return json(store.get(World.class, ThreadLocalRandom.current().nextInt(DB_ROWS) + 1));
   }
 
   /**