{"action":"opened","issue":{"url":"https://api.github.com/repos/jOOQ/jOOQ/issues/5844","repository_url":"https://api.github.com/repos/jOOQ/jOOQ","labels_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/5844/labels{/name}","comments_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/5844/comments","events_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/5844/events","html_url":"https://github.com/jOOQ/jOOQ/issues/5844","id":206141132,"number":5844,"title":"AbstractRoutine.executeSelectFromPOSTGRES throws IndexOutOfBoundsException without sql result","user":{"login":"meiermarkus","id":25634136,"avatar_url":"https://avatars.githubusercontent.com/u/25634136?v=3","gravatar_id":"","url":"https://api.github.com/users/meiermarkus","html_url":"https://github.com/meiermarkus","followers_url":"https://api.github.com/users/meiermarkus/followers","following_url":"https://api.github.com/users/meiermarkus/following{/other_user}","gists_url":"https://api.github.com/users/meiermarkus/gists{/gist_id}","starred_url":"https://api.github.com/users/meiermarkus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meiermarkus/subscriptions","organizations_url":"https://api.github.com/users/meiermarkus/orgs","repos_url":"https://api.github.com/users/meiermarkus/repos","events_url":"https://api.github.com/users/meiermarkus/events{/privacy}","received_events_url":"https://api.github.com/users/meiermarkus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-08T09:32:47Z","updated_at":"2017-02-08T09:32:47Z","closed_at":null,"body":"This is a bit a corner case, but when a Postgres function (that returns a TABLE) doesn't return anything, jooq will throw an `IndexOutOfBoundsException`.\r\nThis seems to be caused in `executeSelectFromPOSTGRES `on line 400 (in master) since `result `isn't checked before accessing.\r\n\r\njava.lang.IndexOutOfBoundsException: Index: 0, Size: 0\r\n\tat java.util.ArrayList.rangeCheck(ArrayList.java:653)\r\n\tat java.util.ArrayList.get(ArrayList.java:429)\r\n\tat org.jooq.impl.ResultImpl.get(ResultImpl.java:2420)\r\n\tat org.jooq.impl.ResultImpl.getValue(ResultImpl.java:300)\r\n\tat org.jooq.impl.AbstractRoutine.executeSelectFromPOSTGRES(AbstractRoutine.java:398)\r\n\tat org.jooq.impl.AbstractRoutine.execute(AbstractRoutine.java:293)\r\n\tat org.jooq.impl.AbstractRoutine.execute(AbstractRoutine.java:275)"}}
{"actor":{"display_login":"meiermarkus"}}