{"action":"closed","issue":{"url":"https://api.github.com/repos/immutables/immutables/issues/392","repository_url":"https://api.github.com/repos/immutables/immutables","labels_url":"https://api.github.com/repos/immutables/immutables/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/immutables/immutables/issues/392/comments","events_url":"https://api.github.com/repos/immutables/immutables/issues/392/events","html_url":"https://github.com/immutables/immutables/issues/392","id":164591517,"number":392,"title":"Lint warnings for generic builder methods taking variadic arguments","user":{"login":"jfancher","id":1724965,"avatar_url":"https://avatars.githubusercontent.com/u/1724965?v=3","gravatar_id":"","url":"https://api.github.com/users/jfancher","html_url":"https://github.com/jfancher","followers_url":"https://api.github.com/users/jfancher/followers","following_url":"https://api.github.com/users/jfancher/following{/other_user}","gists_url":"https://api.github.com/users/jfancher/gists{/gist_id}","starred_url":"https://api.github.com/users/jfancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfancher/subscriptions","organizations_url":"https://api.github.com/users/jfancher/orgs","repos_url":"https://api.github.com/users/jfancher/repos","events_url":"https://api.github.com/users/jfancher/events{/privacy}","received_events_url":"https://api.github.com/users/jfancher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/immutables/immutables/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/immutables/immutables/milestones/43","html_url":"https://github.com/immutables/immutables/milestones/2.2.11","labels_url":"https://api.github.com/repos/immutables/immutables/milestones/43/labels","id":1873006,"number":43,"title":"2.2.11","description":null,"creator":{"login":"elucash","id":1692611,"avatar_url":"https://avatars.githubusercontent.com/u/1692611?v=3","gravatar_id":"","url":"https://api.github.com/users/elucash","html_url":"https://github.com/elucash","followers_url":"https://api.github.com/users/elucash/followers","following_url":"https://api.github.com/users/elucash/following{/other_user}","gists_url":"https://api.github.com/users/elucash/gists{/gist_id}","starred_url":"https://api.github.com/users/elucash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elucash/subscriptions","organizations_url":"https://api.github.com/users/elucash/orgs","repos_url":"https://api.github.com/users/elucash/repos","events_url":"https://api.github.com/users/elucash/events{/privacy}","received_events_url":"https://api.github.com/users/elucash/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":1,"state":"open","created_at":"2016-07-08T20:36:06Z","updated_at":"2016-08-14T10:28:51Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-07-08T18:41:17Z","updated_at":"2016-08-14T10:28:51Z","closed_at":"2016-08-14T10:28:51Z","body":"Example:\r\n\r\n````java\r\n@Value.Immutable\r\ninterface Bug<E> {\r\n  Set<E> getItems();\r\n}\r\n````\r\n\r\nThis does not compile cleanly with `javac -Xlint` because `Varargs method could cause heap pollution from non-reifiable varargs parameter elements` on each of the methods that takes a `E...` and passes it as an argument to a method that takes a `E[]`. This warning is not affected by `@SuppressWarnings(\"all\")` nor by `@SafeVarargs`.\r\n\r\nA solution is to add `@SuppressWarnings(\"varargs\")`. This may not be great, because it's very javac-specific. But the only other solution I've found is to change the implementation of the method to iterate the array instead of passing it around.\r\n\r\nAlternatively (or additionally), I don't find the varargs overloads to be all that useful... maybe the simplest fix would be to have a style option to turn them off?"}}
{"actor":{"display_login":"elucash"}}