{"action":"opened","issue":{"url":"https://api.github.com/repos/teamed/qulice/issues/480","labels_url":"https://api.github.com/repos/teamed/qulice/issues/480/labels{/name}","comments_url":"https://api.github.com/repos/teamed/qulice/issues/480/comments","events_url":"https://api.github.com/repos/teamed/qulice/issues/480/events","html_url":"https://github.com/teamed/qulice/issues/480","id":111285836,"number":480,"title":"AvoidInstantiatingObjectsInLoops prohibits instantiating the Iterable we're iterating over","user":{"login":"Suseika","id":4467948,"avatar_url":"https://avatars.githubusercontent.com/u/4467948?v=3","gravatar_id":"","url":"https://api.github.com/users/Suseika","html_url":"https://github.com/Suseika","followers_url":"https://api.github.com/users/Suseika/followers","following_url":"https://api.github.com/users/Suseika/following{/other_user}","gists_url":"https://api.github.com/users/Suseika/gists{/gist_id}","starred_url":"https://api.github.com/users/Suseika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suseika/subscriptions","organizations_url":"https://api.github.com/users/Suseika/orgs","repos_url":"https://api.github.com/users/Suseika/repos","events_url":"https://api.github.com/users/Suseika/events{/privacy}","received_events_url":"https://api.github.com/users/Suseika/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-13T22:35:24Z","updated_at":"2015-10-13T22:35:24Z","closed_at":null,"body":"This code would not pass qulice check, but it should:\r\n\r\n```java\r\n        for (final Integer number : new ArrayList<Integer>(Tv.TEN)) {\r\n            number.intValue();\r\n        }\r\n```\r\n\r\nOf course, that is not a particularly good piece of code, it is just a minimal reproducible example.\r\n\r\nDisallowing instantiating the `Iterable` in the loop head makes us use a one-time variable, which would be another quality issue.\r\n\r\nA similar issue in PMD bug tracker: http://sourceforge.net/p/pmd/bugs/1215/"}}