{"action":"opened","issue":{"url":"https://api.github.com/repos/vrk-kpa/xroad-public/issues/10","repository_url":"https://api.github.com/repos/vrk-kpa/xroad-public","labels_url":"https://api.github.com/repos/vrk-kpa/xroad-public/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/vrk-kpa/xroad-public/issues/10/comments","events_url":"https://api.github.com/repos/vrk-kpa/xroad-public/issues/10/events","html_url":"https://github.com/vrk-kpa/xroad-public/issues/10","id":181487359,"number":10,"title":"Possible infinite loop in ee.ria.xroad.asyncdb.messagequeue.MessageQueueImpl","user":{"login":"erikjogi","id":1137875,"avatar_url":"https://avatars.githubusercontent.com/u/1137875?v=3","gravatar_id":"","url":"https://api.github.com/users/erikjogi","html_url":"https://github.com/erikjogi","followers_url":"https://api.github.com/users/erikjogi/followers","following_url":"https://api.github.com/users/erikjogi/following{/other_user}","gists_url":"https://api.github.com/users/erikjogi/gists{/gist_id}","starred_url":"https://api.github.com/users/erikjogi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikjogi/subscriptions","organizations_url":"https://api.github.com/users/erikjogi/orgs","repos_url":"https://api.github.com/users/erikjogi/repos","events_url":"https://api.github.com/users/erikjogi/events{/privacy}","received_events_url":"https://api.github.com/users/erikjogi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-06T18:13:47Z","updated_at":"2016-10-06T18:13:47Z","closed_at":null,"body":"MessageQueueImpl.createTempDir() has a while() loop that will run infinitely if creating of the directory fails. It can be caused easily by insufficient permissions or some other disk-level error.\r\n\r\nAlso it is very rarely a good idea to catch all exceptions with catch(Exception). In this case a try/catch loop in absolutely pointless because by documentation the new File() and mkdirs() can only fail with a NullPointerException or a SecurityException. Both cases will never resolve itself and therefore doing it in loop has no effect. Catching NullPointerException is never a good idea - even outside the loop - it is a programming error and cannot be fixed in a catch block."}}
{"actor":{"display_login":"erikjogi"}}