{"action":"created","issue":{"url":"https://api.github.com/repos/streamsupport/streamsupport/issues/4","repository_url":"https://api.github.com/repos/streamsupport/streamsupport","labels_url":"https://api.github.com/repos/streamsupport/streamsupport/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/streamsupport/streamsupport/issues/4/comments","events_url":"https://api.github.com/repos/streamsupport/streamsupport/issues/4/events","html_url":"https://github.com/streamsupport/streamsupport/issues/4","id":163408151,"number":4,"title":"Error no such field \"elementData\"","user":{"login":"m3n4c3","id":18590882,"avatar_url":"https://avatars.githubusercontent.com/u/18590882?v=3","gravatar_id":"","url":"https://api.github.com/users/m3n4c3","html_url":"https://github.com/m3n4c3","followers_url":"https://api.github.com/users/m3n4c3/followers","following_url":"https://api.github.com/users/m3n4c3/following{/other_user}","gists_url":"https://api.github.com/users/m3n4c3/gists{/gist_id}","starred_url":"https://api.github.com/users/m3n4c3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3n4c3/subscriptions","organizations_url":"https://api.github.com/users/m3n4c3/orgs","repos_url":"https://api.github.com/users/m3n4c3/repos","events_url":"https://api.github.com/users/m3n4c3/events{/privacy}","received_events_url":"https://api.github.com/users/m3n4c3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"stefan-zobel","id":18482851,"avatar_url":"https://avatars.githubusercontent.com/u/18482851?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-zobel","html_url":"https://github.com/stefan-zobel","followers_url":"https://api.github.com/users/stefan-zobel/followers","following_url":"https://api.github.com/users/stefan-zobel/following{/other_user}","gists_url":"https://api.github.com/users/stefan-zobel/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-zobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-zobel/subscriptions","organizations_url":"https://api.github.com/users/stefan-zobel/orgs","repos_url":"https://api.github.com/users/stefan-zobel/repos","events_url":"https://api.github.com/users/stefan-zobel/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-zobel/received_events","type":"User","site_admin":false},"assignees":[{"login":"stefan-zobel","id":18482851,"avatar_url":"https://avatars.githubusercontent.com/u/18482851?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-zobel","html_url":"https://github.com/stefan-zobel","followers_url":"https://api.github.com/users/stefan-zobel/followers","following_url":"https://api.github.com/users/stefan-zobel/following{/other_user}","gists_url":"https://api.github.com/users/stefan-zobel/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-zobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-zobel/subscriptions","organizations_url":"https://api.github.com/users/stefan-zobel/orgs","repos_url":"https://api.github.com/users/stefan-zobel/repos","events_url":"https://api.github.com/users/stefan-zobel/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-zobel/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-07-01T14:32:30Z","updated_at":"2016-07-01T21:21:43Z","closed_at":null,"body":"When I call StreamSupport.stream(someArrayList).forEach(someLamda) this Exception gets thrown.\r\n\r\nI'm using Android 5.0 on a Samsung Galaxy S5.\r\n\r\nCan you please explain this Error and/or how to fix it?\r\n\r\nThank you!\r\n\r\n\r\nStacktrace:\r\n\r\n    07-01 16:29:18.736: E/AndroidRuntime(27444): java.lang.Error: java.lang.NoSuchFieldException: elementData\r\n    07-01 16:29:18.736: E/AndroidRuntime(27444): \tat java8.util.ArrayListSpliterator.<clinit>(ArrayListSpliterator.java:211)\r\n    07-01 16:29:18.736: E/AndroidRuntime(27444): \tat java8.util.Spliterators.listSpliterator(Spliterators.java:918)\r\n    07-01 16:29:18.736: E/AndroidRuntime(27444): \tat java8.util.Spliterators.spliterator(Spliterators.java:898)\r\n    07-01 16:29:18.736: E/AndroidRuntime(27444): \tat java8.util.stream.StreamSupport.stream(StreamSupport.java:99)\r\n"},"comment":{"url":"https://api.github.com/repos/streamsupport/streamsupport/issues/comments/230050077","html_url":"https://github.com/streamsupport/streamsupport/issues/4#issuecomment-230050077","issue_url":"https://api.github.com/repos/streamsupport/streamsupport/issues/4","id":230050077,"user":{"login":"stefan-zobel","id":18482851,"avatar_url":"https://avatars.githubusercontent.com/u/18482851?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-zobel","html_url":"https://github.com/stefan-zobel","followers_url":"https://api.github.com/users/stefan-zobel/followers","following_url":"https://api.github.com/users/stefan-zobel/following{/other_user}","gists_url":"https://api.github.com/users/stefan-zobel/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-zobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-zobel/subscriptions","organizations_url":"https://api.github.com/users/stefan-zobel/orgs","repos_url":"https://api.github.com/users/stefan-zobel/repos","events_url":"https://api.github.com/users/stefan-zobel/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-zobel/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T21:21:43Z","updated_at":"2016-07-01T21:21:43Z","body":"You also wanted an explanation of this error.\r\n\r\nThere are 3 possible cases with respect to the detection whether streamsupport is executed on Android or not\r\n\r\n\r\n```\r\n1:   a) true,  b) false       ==> running on Android, API level 22 or lower\r\n\r\n2:   a) true,  b) true        ==> running on Android, API level 23 or higher\r\n\r\n3:   a) false, b) true/false  ==> NOT running on Android\r\n```\r\n\r\n\r\nYour result seems to be either 2 or 3. That is, streamsupport assumes it gets executed on an OpenJDK-compatible Java VM (case 3) or on Android N (case 2) where the private Object[] member in j.u.ArrayList is named \"elementData\".\r\n\r\nBut on Android 5 (case 1) the Object[] member is named \"array\", hence the NoSuchFieldException.\r\n"}}
{"actor":{"display_login":"stefan-zobel"}}