{"action":"created","issue":{"url":"https://api.github.com/repos/Kotlin/anko/issues/335","repository_url":"https://api.github.com/repos/Kotlin/anko","labels_url":"https://api.github.com/repos/Kotlin/anko/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/Kotlin/anko/issues/335/comments","events_url":"https://api.github.com/repos/Kotlin/anko/issues/335/events","html_url":"https://github.com/Kotlin/anko/issues/335","id":211621366,"number":335,"title":"NoSuchElementException when attempting to iterate over views","user":{"login":"mvysny","id":254091,"avatar_url":"https://avatars0.githubusercontent.com/u/254091?v=3","gravatar_id":"","url":"https://api.github.com/users/mvysny","html_url":"https://github.com/mvysny","followers_url":"https://api.github.com/users/mvysny/followers","following_url":"https://api.github.com/users/mvysny/following{/other_user}","gists_url":"https://api.github.com/users/mvysny/gists{/gist_id}","starred_url":"https://api.github.com/users/mvysny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvysny/subscriptions","organizations_url":"https://api.github.com/users/mvysny/orgs","repos_url":"https://api.github.com/users/mvysny/repos","events_url":"https://api.github.com/users/mvysny/events{/privacy}","received_events_url":"https://api.github.com/users/mvysny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-03T08:10:26Z","updated_at":"2017-03-03T08:14:16Z","closed_at":null,"body":"A very simple for loop (currently in Java, not yet converted to Kotlin, I apologize :-) ):\r\n\r\n```java\r\nfor (Iterator<View> i = ViewChildrenSequencesKt.childrenRecursiveSequence(KViewsKt.getRoot(fm)).iterator(); i.hasNext(); ) {\r\n            final View view = i.next();\r\n```\r\n\r\n(the `getRoot()` looks like this:\r\n```\r\nval Activity.root: View get() = findViewById(android.R.id.content)!!\r\n```\r\n\r\nfails with\r\n\r\n```\r\njava.util.NoSuchElementException\r\nat org.jetbrains.anko.ViewChildrenRecursiveSequence$RecursiveViewIterator.next(viewChildrenSequences.kt:128)\r\nat org.jetbrains.anko.ViewChildrenRecursiveSequence$RecursiveViewIterator.next(viewChildrenSequences.kt:122)\r\n```\r\nThis is for Anko 0.9"},"comment":{"url":"https://api.github.com/repos/Kotlin/anko/issues/comments/283892857","html_url":"https://github.com/Kotlin/anko/issues/335#issuecomment-283892857","issue_url":"https://api.github.com/repos/Kotlin/anko/issues/335","id":283892857,"user":{"login":"mvysny","id":254091,"avatar_url":"https://avatars0.githubusercontent.com/u/254091?v=3","gravatar_id":"","url":"https://api.github.com/users/mvysny","html_url":"https://github.com/mvysny","followers_url":"https://api.github.com/users/mvysny/followers","following_url":"https://api.github.com/users/mvysny/following{/other_user}","gists_url":"https://api.github.com/users/mvysny/gists{/gist_id}","starred_url":"https://api.github.com/users/mvysny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvysny/subscriptions","organizations_url":"https://api.github.com/users/mvysny/orgs","repos_url":"https://api.github.com/users/mvysny/repos","events_url":"https://api.github.com/users/mvysny/events{/privacy}","received_events_url":"https://api.github.com/users/mvysny/received_events","type":"User","site_admin":false},"created_at":"2017-03-03T08:14:16Z","updated_at":"2017-03-03T08:14:16Z","body":"Also reproducible with Anko 0.9.1a:\r\n\r\n```\r\njava.util.NoSuchElementException\r\nat org.jetbrains.anko.ViewChildrenRecursiveSequence$RecursiveViewIterator.next(viewChildrenSequences.kt:129)\r\nat org.jetbrains.anko.ViewChildrenRecursiveSequence$RecursiveViewIterator.next(viewChildrenSequences.kt:123)\r\n```"}}
{"actor":{"display_login":"mvysny"}}