{"action":"created","issue":{"url":"https://api.github.com/repos/immutables/immutables/issues/326","repository_url":"https://api.github.com/repos/immutables/immutables","labels_url":"https://api.github.com/repos/immutables/immutables/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/immutables/immutables/issues/326/comments","events_url":"https://api.github.com/repos/immutables/immutables/issues/326/events","html_url":"https://github.com/immutables/immutables/issues/326","id":154740992,"number":326,"title":"@Value.Default behavior change with immutable collections (2.2-beta5)","user":{"login":"nezda","id":179091,"avatar_url":"https://avatars.githubusercontent.com/u/179091?v=3","gravatar_id":"","url":"https://api.github.com/users/nezda","html_url":"https://github.com/nezda","followers_url":"https://api.github.com/users/nezda/followers","following_url":"https://api.github.com/users/nezda/following{/other_user}","gists_url":"https://api.github.com/users/nezda/gists{/gist_id}","starred_url":"https://api.github.com/users/nezda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nezda/subscriptions","organizations_url":"https://api.github.com/users/nezda/orgs","repos_url":"https://api.github.com/users/nezda/repos","events_url":"https://api.github.com/users/nezda/events{/privacy}","received_events_url":"https://api.github.com/users/nezda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/immutables/immutables/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/immutables/immutables/milestones/27","html_url":"https://github.com/immutables/immutables/milestones/2.2","labels_url":"https://api.github.com/repos/immutables/immutables/milestones/27/labels","id":1624289,"number":27,"title":"2.2","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":13,"closed_issues":1,"state":"open","created_at":"2016-03-06T08:04:51Z","updated_at":"2016-05-17T06:29:24Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-05-13T15:38:12Z","updated_at":"2016-05-17T06:29:24Z","closed_at":"2016-05-17T06:29:24Z","body":"In 2.1.12, if `caseSensitive()` returned `true`, below simplified code would return that `ImmutableSortedSet` with custom comparator, but in 2.2-beta5 it always returns a new `ImmutableSet` (case sensitive hash set).  My work around is to change return type to `ImmutableSortedSet` (thus can't use hash set even for case sensitive situations).\r\n\r\n```java\r\n  @Value.Default\r\n  public ImmutableSet<String> words() {\r\n    final Set<String> words;\r\n    if (caseInsensitive()) {\r\n      words = Sets.newTreeSet(String.CASE_INSENSITIVE_ORDER);\r\n    } else {\r\n      words = Sets.newHashSet();\r\n    }\r\n    words.addAll(Arrays.asList(\r\n        \"Foo\",\r\n        \"foo\",\r\n        \"BAR\",\r\n        \"bar\"\r\n    ));\r\n    if (caseInsensitive()) {\r\n      return ImmutableSortedSet.orderedBy(String.CASE_INSENSITIVE_ORDER).addAll(words).build();\r\n    } else {\r\n      return ImmutableSet.copyOf(words);\r\n    }\r\n  }\r\n```"},"comment":{"url":"https://api.github.com/repos/immutables/immutables/issues/comments/219630631","html_url":"https://github.com/immutables/immutables/issues/326#issuecomment-219630631","issue_url":"https://api.github.com/repos/immutables/immutables/issues/326","id":219630631,"user":{"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},"created_at":"2016-05-17T06:29:24Z","updated_at":"2016-05-17T06:29:24Z","body":"released in 2.2 Thank you!"}}