|
@@ -49,7 +49,7 @@ final class MongoDbRepository implements Repository {
|
|
fortuneCollection.find ().forEach ((Block<Document>)doc ->
|
|
fortuneCollection.find ().forEach ((Block<Document>)doc ->
|
|
fortunes.add (
|
|
fortunes.add (
|
|
new Fortune (
|
|
new Fortune (
|
|
- doc.get ("_id", Integer.class).intValue (),
|
|
|
|
|
|
+ doc.get ("_id", Double.class).intValue (),
|
|
(String)doc.get ("message")
|
|
(String)doc.get ("message")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
@@ -76,8 +76,8 @@ final class MongoDbRepository implements Repository {
|
|
|
|
|
|
private World createWorld (Document world) {
|
|
private World createWorld (Document world) {
|
|
return new World (
|
|
return new World (
|
|
- world.get ("_id", Integer.class).intValue (),
|
|
|
|
- world.get ("randomNumber", Integer.class).intValue ()
|
|
|
|
|
|
+ world.get ("_id", Double.class).intValue (),
|
|
|
|
+ world.get ("randomNumber", Double.class).intValue ()
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|