{"action":"created","comment":{"url":"https://api.github.com/repos/excilys/androidannotations/pulls/comments/44868884","id":44868884,"diff_hunk":"@@ -322,10 +322,21 @@ private IJExpression extractResValue(SharedPrefHolder holder, Element method, IR\n \t\tcase STRING:\n \t\t\tresourceGetMethodName = \"getString\";\n \t\t\tbreak;\n+\t\tcase ARRAY:\n+\t\t\tresourceGetMethodName = \"getStringArray\";\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tbreak;\n \t\t}\n-\t\treturn holder.getContextField().invoke(\"getResources\").invoke(resourceGetMethodName).arg(idRef);\n+\n+\t\tJInvocation resourceInvocation = holder.getContextField().invoke(\"getResources\").invoke(resourceGetMethodName).arg(idRef);\n+\n+\t\tif (IRClass.Res.ARRAY.equals(res)) {\n+\t\t\tJInvocation asList = getClasses().ARRAYS.staticInvoke(\"asList\");\n+\t\t\tJInvocation newHashMap = JExpr._new(getClasses().HASH_SET.narrow(getClasses().STRING));\n+\t\t\tresourceInvocation = newHashMap.arg(asList.arg(resourceInvocation));","path":"AndroidAnnotations/androidannotations-core/androidannotations/src/main/java/org/androidannotations/internal/core/handler/SharedPrefHandler.java","position":26,"original_position":26,"commit_id":"8cf148901ab0134ebfad04e0697cbcfc8cf6d59d","original_commit_id":"8cf148901ab0134ebfad04e0697cbcfc8cf6d59d","user":{"login":"dodgex","id":204013,"avatar_url":"https://avatars.githubusercontent.com/u/204013?v=3","gravatar_id":"","url":"https://api.github.com/users/dodgex","html_url":"https://github.com/dodgex","followers_url":"https://api.github.com/users/dodgex/followers","following_url":"https://api.github.com/users/dodgex/following{/other_user}","gists_url":"https://api.github.com/users/dodgex/gists{/gist_id}","starred_url":"https://api.github.com/users/dodgex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodgex/subscriptions","organizations_url":"https://api.github.com/users/dodgex/orgs","repos_url":"https://api.github.com/users/dodgex/repos","events_url":"https://api.github.com/users/dodgex/events{/privacy}","received_events_url":"https://api.github.com/users/dodgex/received_events","type":"User","site_admin":false},"body":"emtpy string array resource should not be a prolem. this code generates `new HashSet<>(Arrays.asList(res.getStringArray(R.array.xxx)));` if the resource is empty, the array is emtpy, the list is empty and the set is empty. also i think we have no way to access the number of items of a resource on compile time as the value might be diffrent for e.g. locales or screen sizes.","created_at":"2015-11-15T08:21:26Z","updated_at":"2015-11-15T08:21:26Z","html_url":"https://github.com/excilys/androidannotations/pull/1626#discussion_r44868884","pull_request_url":"https://api.github.com/repos/excilys/androidannotations/pulls/1626","_links":{"self":{"href":"https://api.github.com/repos/excilys/androidannotations/pulls/comments/44868884"},"html":{"href":"https://github.com/excilys/androidannotations/pull/1626#discussion_r44868884"},"pull_request":{"href":"https://api.github.com/repos/excilys/androidannotations/pulls/1626"}}},"pull_request":{"url":"https://api.github.com/repos/excilys/androidannotations/pulls/1626","id":50742172,"html_url":"https://github.com/excilys/androidannotations/pull/1626","diff_url":"https://github.com/excilys/androidannotations/pull/1626.diff","patch_url":"https://github.com/excilys/androidannotations/pull/1626.patch","issue_url":"https://api.github.com/repos/excilys/androidannotations/issues/1626","number":1626,"state":"open","locked":false,"title":"support string arrays in defaultres","user":{"login":"dodgex","id":204013,"avatar_url":"https://avatars.githubusercontent.com/u/204013?v=3","gravatar_id":"","url":"https://api.github.com/users/dodgex","html_url":"https://github.com/dodgex","followers_url":"https://api.github.com/users/dodgex/followers","following_url":"https://api.github.com/users/dodgex/following{/other_user}","gists_url":"https://api.github.com/users/dodgex/gists{/gist_id}","starred_url":"https://api.github.com/users/dodgex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodgex/subscriptions","organizations_url":"https://api.github.com/users/dodgex/orgs","repos_url":"https://api.github.com/users/dodgex/repos","events_url":"https://api.github.com/users/dodgex/events{/privacy}","received_events_url":"https://api.github.com/users/dodgex/received_events","type":"User","site_admin":false},"body":"see https://github.com/excilys/androidannotations/issues/1625","created_at":"2015-11-15T08:13:34Z","updated_at":"2015-11-15T08:21:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21aa2125bc1c820fa9ef5686c56591fab821f66a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/excilys/androidannotations/pulls/1626/commits","review_comments_url":"https://api.github.com/repos/excilys/androidannotations/pulls/1626/comments","review_comment_url":"https://api.github.com/repos/excilys/androidannotations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/excilys/androidannotations/issues/1626/comments","statuses_url":"https://api.github.com/repos/excilys/androidannotations/statuses/8cf148901ab0134ebfad04e0697cbcfc8cf6d59d","head":{"label":"dodgex:1625_support_string_arrays_in_defaultres","ref":"1625_support_string_arrays_in_defaultres","sha":"8cf148901ab0134ebfad04e0697cbcfc8cf6d59d","user":{"login":"dodgex","id":204013,"avatar_url":"https://avatars.githubusercontent.com/u/204013?v=3","gravatar_id":"","url":"https://api.github.com/users/dodgex","html_url":"https://github.com/dodgex","followers_url":"https://api.github.com/users/dodgex/followers","following_url":"https://api.github.com/users/dodgex/following{/other_user}","gists_url":"https://api.github.com/users/dodgex/gists{/gist_id}","starred_url":"https://api.github.com/users/dodgex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodgex/subscriptions","organizations_url":"https://api.github.com/users/dodgex/orgs","repos_url":"https://api.github.com/users/dodgex/repos","events_url":"https://api.github.com/users/dodgex/events{/privacy}","received_events_url":"https://api.github.com/users/dodgex/received_events","type":"User","site_admin":false},"repo":{"id":13364807,"name":"androidannotations","full_name":"dodgex/androidannotations","owner":{"login":"dodgex","id":204013,"avatar_url":"https://avatars.githubusercontent.com/u/204013?v=3","gravatar_id":"","url":"https://api.github.com/users/dodgex","html_url":"https://github.com/dodgex","followers_url":"https://api.github.com/users/dodgex/followers","following_url":"https://api.github.com/users/dodgex/following{/other_user}","gists_url":"https://api.github.com/users/dodgex/gists{/gist_id}","starred_url":"https://api.github.com/users/dodgex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodgex/subscriptions","organizations_url":"https://api.github.com/users/dodgex/orgs","repos_url":"https://api.github.com/users/dodgex/repos","events_url":"https://api.github.com/users/dodgex/events{/privacy}","received_events_url":"https://api.github.com/users/dodgex/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dodgex/androidannotations","description":"Fast Android Development. Easy maintainance.","fork":true,"url":"https://api.github.com/repos/dodgex/androidannotations","forks_url":"https://api.github.com/repos/dodgex/androidannotations/forks","keys_url":"https://api.github.com/repos/dodgex/androidannotations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dodgex/androidannotations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dodgex/androidannotations/teams","hooks_url":"https://api.github.com/repos/dodgex/androidannotations/hooks","issue_events_url":"https://api.github.com/repos/dodgex/androidannotations/issues/events{/number}","events_url":"https://api.github.com/repos/dodgex/androidannotations/events","assignees_url":"https://api.github.com/repos/dodgex/androidannotations/assignees{/user}","branches_url":"https://api.github.com/repos/dodgex/androidannotations/branches{/branch}","tags_url":"https://api.github.com/repos/dodgex/androidannotations/tags","blobs_url":"https://api.github.com/repos/dodgex/androidannotations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dodgex/androidannotations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dodgex/androidannotations/git/refs{/sha}","trees_url":"https://api.github.com/repos/dodgex/androidannotations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dodgex/androidannotations/statuses/{sha}","languages_url":"https://api.github.com/repos/dodgex/androidannotations/languages","stargazers_url":"https://api.github.com/repos/dodgex/androidannotations/stargazers","contributors_url":"https://api.github.com/repos/dodgex/androidannotations/contributors","subscribers_url":"https://api.github.com/repos/dodgex/androidannotations/subscribers","subscription_url":"https://api.github.com/repos/dodgex/androidannotations/subscription","commits_url":"https://api.github.com/repos/dodgex/androidannotations/commits{/sha}","git_commits_url":"https://api.github.com/repos/dodgex/androidannotations/git/commits{/sha}","comments_url":"https://api.github.com/repos/dodgex/androidannotations/comments{/number}","issue_comment_url":"https://api.github.com/repos/dodgex/androidannotations/issues/comments{/number}","contents_url":"https://api.github.com/repos/dodgex/androidannotations/contents/{+path}","compare_url":"https://api.github.com/repos/dodgex/androidannotations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dodgex/androidannotations/merges","archive_url":"https://api.github.com/repos/dodgex/androidannotations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dodgex/androidannotations/downloads","issues_url":"https://api.github.com/repos/dodgex/androidannotations/issues{/number}","pulls_url":"https://api.github.com/repos/dodgex/androidannotations/pulls{/number}","milestones_url":"https://api.github.com/repos/dodgex/androidannotations/milestones{/number}","notifications_url":"https://api.github.com/repos/dodgex/androidannotations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dodgex/androidannotations/labels{/name}","releases_url":"https://api.github.com/repos/dodgex/androidannotations/releases{/id}","created_at":"2013-10-06T16:13:51Z","updated_at":"2015-05-05T16:37:59Z","pushed_at":"2015-11-15T08:13:59Z","git_url":"git://github.com/dodgex/androidannotations.git","ssh_url":"git@github.com:dodgex/androidannotations.git","clone_url":"https://github.com/dodgex/androidannotations.git","svn_url":"https://github.com/dodgex/androidannotations","homepage":"http://androidannotations.org","size":24678,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"excilys:develop","ref":"develop","sha":"388381d9c46185e73b7d2354267d1748bf8dfb87","user":{"login":"excilys","id":668697,"avatar_url":"https://avatars.githubusercontent.com/u/668697?v=3","gravatar_id":"","url":"https://api.github.com/users/excilys","html_url":"https://github.com/excilys","followers_url":"https://api.github.com/users/excilys/followers","following_url":"https://api.github.com/users/excilys/following{/other_user}","gists_url":"https://api.github.com/users/excilys/gists{/gist_id}","starred_url":"https://api.github.com/users/excilys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/excilys/subscriptions","organizations_url":"https://api.github.com/users/excilys/orgs","repos_url":"https://api.github.com/users/excilys/repos","events_url":"https://api.github.com/users/excilys/events{/privacy}","received_events_url":"https://api.github.com/users/excilys/received_events","type":"Organization","site_admin":false},"repo":{"id":3116751,"name":"androidannotations","full_name":"excilys/androidannotations","owner":{"login":"excilys","id":668697,"avatar_url":"https://avatars.githubusercontent.com/u/668697?v=3","gravatar_id":"","url":"https://api.github.com/users/excilys","html_url":"https://github.com/excilys","followers_url":"https://api.github.com/users/excilys/followers","following_url":"https://api.github.com/users/excilys/following{/other_user}","gists_url":"https://api.github.com/users/excilys/gists{/gist_id}","starred_url":"https://api.github.com/users/excilys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/excilys/subscriptions","organizations_url":"https://api.github.com/users/excilys/orgs","repos_url":"https://api.github.com/users/excilys/repos","events_url":"https://api.github.com/users/excilys/events{/privacy}","received_events_url":"https://api.github.com/users/excilys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/excilys/androidannotations","description":"Fast Android Development. Easy maintainance.","fork":false,"url":"https://api.github.com/repos/excilys/androidannotations","forks_url":"https://api.github.com/repos/excilys/androidannotations/forks","keys_url":"https://api.github.com/repos/excilys/androidannotations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/excilys/androidannotations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/excilys/androidannotations/teams","hooks_url":"https://api.github.com/repos/excilys/androidannotations/hooks","issue_events_url":"https://api.github.com/repos/excilys/androidannotations/issues/events{/number}","events_url":"https://api.github.com/repos/excilys/androidannotations/events","assignees_url":"https://api.github.com/repos/excilys/androidannotations/assignees{/user}","branches_url":"https://api.github.com/repos/excilys/androidannotations/branches{/branch}","tags_url":"https://api.github.com/repos/excilys/androidannotations/tags","blobs_url":"https://api.github.com/repos/excilys/androidannotations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/excilys/androidannotations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/excilys/androidannotations/git/refs{/sha}","trees_url":"https://api.github.com/repos/excilys/androidannotations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/excilys/androidannotations/statuses/{sha}","languages_url":"https://api.github.com/repos/excilys/androidannotations/languages","stargazers_url":"https://api.github.com/repos/excilys/androidannotations/stargazers","contributors_url":"https://api.github.com/repos/excilys/androidannotations/contributors","subscribers_url":"https://api.github.com/repos/excilys/androidannotations/subscribers","subscription_url":"https://api.github.com/repos/excilys/androidannotations/subscription","commits_url":"https://api.github.com/repos/excilys/androidannotations/commits{/sha}","git_commits_url":"https://api.github.com/repos/excilys/androidannotations/git/commits{/sha}","comments_url":"https://api.github.com/repos/excilys/androidannotations/comments{/number}","issue_comment_url":"https://api.github.com/repos/excilys/androidannotations/issues/comments{/number}","contents_url":"https://api.github.com/repos/excilys/androidannotations/contents/{+path}","compare_url":"https://api.github.com/repos/excilys/androidannotations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/excilys/androidannotations/merges","archive_url":"https://api.github.com/repos/excilys/androidannotations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/excilys/androidannotations/downloads","issues_url":"https://api.github.com/repos/excilys/androidannotations/issues{/number}","pulls_url":"https://api.github.com/repos/excilys/androidannotations/pulls{/number}","milestones_url":"https://api.github.com/repos/excilys/androidannotations/milestones{/number}","notifications_url":"https://api.github.com/repos/excilys/androidannotations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/excilys/androidannotations/labels{/name}","releases_url":"https://api.github.com/repos/excilys/androidannotations/releases{/id}","created_at":"2012-01-06T08:48:03Z","updated_at":"2015-11-15T06:46:07Z","pushed_at":"2015-11-15T08:14:00Z","git_url":"git://github.com/excilys/androidannotations.git","ssh_url":"git@github.com:excilys/androidannotations.git","clone_url":"https://github.com/excilys/androidannotations.git","svn_url":"https://github.com/excilys/androidannotations","homepage":"http://androidannotations.org","size":45424,"stargazers_count":6416,"watchers_count":6416,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1844,"mirror_url":null,"open_issues_count":47,"forks":1844,"open_issues":47,"watchers":6416,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/excilys/androidannotations/pulls/1626"},"html":{"href":"https://github.com/excilys/androidannotations/pull/1626"},"issue":{"href":"https://api.github.com/repos/excilys/androidannotations/issues/1626"},"comments":{"href":"https://api.github.com/repos/excilys/androidannotations/issues/1626/comments"},"review_comments":{"href":"https://api.github.com/repos/excilys/androidannotations/pulls/1626/comments"},"review_comment":{"href":"https://api.github.com/repos/excilys/androidannotations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/excilys/androidannotations/pulls/1626/commits"},"statuses":{"href":"https://api.github.com/repos/excilys/androidannotations/statuses/8cf148901ab0134ebfad04e0697cbcfc8cf6d59d"}}}}