{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/2826","repository_url":"https://api.github.com/repos/realm/realm-java","labels_url":"https://api.github.com/repos/realm/realm-java/issues/2826/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/2826/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/2826/events","html_url":"https://github.com/realm/realm-java/issues/2826","id":155278198,"number":2826,"title":"Grammar: \"No results was found.\"","user":{"login":"chadsimtap","id":17456372,"avatar_url":"https://avatars.githubusercontent.com/u/17456372?v=3","gravatar_id":"","url":"https://api.github.com/users/chadsimtap","html_url":"https://github.com/chadsimtap","followers_url":"https://api.github.com/users/chadsimtap/followers","following_url":"https://api.github.com/users/chadsimtap/following{/other_user}","gists_url":"https://api.github.com/users/chadsimtap/gists{/gist_id}","starred_url":"https://api.github.com/users/chadsimtap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadsimtap/subscriptions","organizations_url":"https://api.github.com/users/chadsimtap/orgs","repos_url":"https://api.github.com/users/chadsimtap/repos","events_url":"https://api.github.com/users/chadsimtap/events{/privacy}","received_events_url":"https://api.github.com/users/chadsimtap/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-17T14:44:55Z","updated_at":"2016-05-17T14:45:48Z","closed_at":null,"body":"When I call .first() on a RealmResults object with no objects, it fires off the error message \"No results was found.\" I found this out accidentally when my code bubbled it up to a Snackbar displayed to the user, and it threw me off. I know this is a very minor thing, but I suggest a grammatical correction of this error message. :) Thanks!\r\n\r\n#### Goal\r\n\r\nGet a suitable error message when there is no data to be returned\r\n\r\n#### Expected Results\r\n\r\n\"No results were found.\"\r\n\r\n#### Actual Results\r\n\r\n\"No results was found.\"\r\n\r\njava.lang.IndexOutOfBoundsException: No results was found.\r\n                                                                     at io.realm.RealmResults.first(RealmResults.java:221)\r\n                                                                     at com.simplytapp.gane.data.user.datasource.LocalUserDataSource$2.call(LocalUserDataSource.java:69)\r\n                                                                     at com.simplytapp.gane.data.user.datasource.LocalUserDataSource$2.call(LocalUserDataSource.java:65)\r\n                                                                     at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:66)\r\n                                                                     at rx.internal.operators.OperatorFilter$FilterSubscriber.onNext(OperatorFilter.java:73)\r\n                                                                     at io.realm.rx.RealmObservableFactory$5$1.onChange(RealmObservableFactory.java:143)\r\n                                                                     at io.realm.rx.RealmObservableFactory$5$1.onChange(RealmObservableFactory.java:139)\r\n                                                                     at io.realm.RealmResults.notifyChangeListeners(RealmResults.java:1032)\r\n                                                                     at io.realm.RealmResults.notifyChangeListeners(RealmResults.java:1018)\r\n                                                                     at io.realm.HandlerController.completedAsyncRealmResults(HandlerController.java:409)\r\n                                                                     at io.realm.HandlerController.handleMessage(HandlerController.java:121)\r\n                                                                     at android.os.Handler.dispatchMessage(Handler.java:98)\r\n                                                                     at android.os.Looper.loop(Looper.java:148)\r\n                                                                     at android.app.ActivityThread.main(ActivityThread.java:5422)\r\n                                                                     at java.lang.reflect.Method.invoke(Native Method)\r\n                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n                                                                  Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: io.realm.RealmResults.class\r\n                                                                     at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:70)\r\n                                                                     at rx.internal.operators.OperatorFilter$FilterSubscriber.onNext(OperatorFilter.java:73) \r\n                                                                     at io.realm.rx.RealmObservableFactory$5$1.onChange(RealmObservableFactory.java:143) \r\n                                                                     at io.realm.rx.RealmObservableFactory$5$1.onChange(RealmObservableFactory.java:139) \r\n                                                                     at io.realm.RealmResults.notifyChangeListeners(RealmResults.java:1032) \r\n                                                                     at io.realm.RealmResults.notifyChangeListeners(RealmResults.java:1018) \r\n                                                                     at io.realm.HandlerController.completedAsyncRealmResults(HandlerController.java:409) \r\n                                                                     at io.realm.HandlerController.handleMessage(HandlerController.java:121) \r\n                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) \r\n                                                                     at android.os.Looper.loop(Looper.java:148) \r\n                                                                     at android.app.ActivityThread.main(ActivityThread.java:5422) \r\n                                                                     at java.lang.reflect.Method.invoke(Native Method) \r\n                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) \r\n                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) \r\n\r\n#### Steps & Code to Reproduce\r\n\r\nCall .first() on a RealmResults object if there are no objects to be returned\r\n\r\n#### Version of Realm and tooling\r\nRealm version(s): 0.90.1\r\n\r\nAndroid Studio version: 2.1.1\r\n\r\nWhich Android version and device: 6.0.1, Nexus 6P\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/219740753","html_url":"https://github.com/realm/realm-java/issues/2826#issuecomment-219740753","issue_url":"https://api.github.com/repos/realm/realm-java/issues/2826","id":219740753,"user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T14:45:48Z","updated_at":"2016-05-17T14:45:48Z","body":"Hi @chadsimtap \r\nThanks for the pointer. We will fix that."}}