{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-java/pulls/comments/55653754","id":55653754,"diff_hunk":"@@ -183,8 +192,25 @@ class RealmTransformer extends Transform {\n                     }\n                 }\n             }\n-        }\n \n+            it.jarInputs.each {\n+                def jarFile = new JarFile(it.file)\n+                def entries = jarFile.entries()\n+                entries.each {","path":"realm-transformer/src/main/groovy/io/realm/transformer/RealmTransformer.groovy","position":null,"original_position":106,"commit_id":"d123d059dc38a4096f8208030cd00806fa263f30","original_commit_id":"ef65a7c485c67d2af87c3992fd90b2e5f3454737","user":{"login":"zaki50","id":406660,"avatar_url":"https://avatars.githubusercontent.com/u/406660?v=3","gravatar_id":"","url":"https://api.github.com/users/zaki50","html_url":"https://github.com/zaki50","followers_url":"https://api.github.com/users/zaki50/followers","following_url":"https://api.github.com/users/zaki50/following{/other_user}","gists_url":"https://api.github.com/users/zaki50/gists{/gist_id}","starred_url":"https://api.github.com/users/zaki50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaki50/subscriptions","organizations_url":"https://api.github.com/users/zaki50/orgs","repos_url":"https://api.github.com/users/zaki50/repos","events_url":"https://api.github.com/users/zaki50/events{/privacy}","received_events_url":"https://api.github.com/users/zaki50/received_events","type":"User","site_admin":false},"body":"I updated the code. \r\n\r\n```\r\n                jarFile.entries().findAll {\r\n                    !it.directory && it.name.endsWith(SdkConstants.DOT_CLASS)\r\n                }.each {\r\n                    def path = it.name\r\n                    def className = path.substring(0, path.length() - SdkConstants.DOT_CLASS.length())\r\n                            .replace(File.separatorChar, '.' as char)\r\n                    classNames.add(className)\r\n                }\r\n```","created_at":"2016-03-10T09:35:12Z","updated_at":"2016-03-10T09:35:12Z","html_url":"https://github.com/realm/realm-java/pull/2406#discussion_r55653754","pull_request_url":"https://api.github.com/repos/realm/realm-java/pulls/2406","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-java/pulls/comments/55653754"},"html":{"href":"https://github.com/realm/realm-java/pull/2406#discussion_r55653754"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-java/pulls/2406"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-java/pulls/2406","id":62269863,"html_url":"https://github.com/realm/realm-java/pull/2406","diff_url":"https://github.com/realm/realm-java/pull/2406.diff","patch_url":"https://github.com/realm/realm-java/pull/2406.patch","issue_url":"https://api.github.com/repos/realm/realm-java/issues/2406","number":2406,"state":"open","locked":false,"title":"transform accesses to model fields in library projects","user":{"login":"zaki50","id":406660,"avatar_url":"https://avatars.githubusercontent.com/u/406660?v=3","gravatar_id":"","url":"https://api.github.com/users/zaki50","html_url":"https://github.com/zaki50","followers_url":"https://api.github.com/users/zaki50/followers","following_url":"https://api.github.com/users/zaki50/following{/other_user}","gists_url":"https://api.github.com/users/zaki50/gists{/gist_id}","starred_url":"https://api.github.com/users/zaki50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaki50/subscriptions","organizations_url":"https://api.github.com/users/zaki50/orgs","repos_url":"https://api.github.com/users/zaki50/repos","events_url":"https://api.github.com/users/zaki50/events{/privacy}","received_events_url":"https://api.github.com/users/zaki50/received_events","type":"User","site_admin":false},"body":"before: modify the access to fields defined in models only in target project.\r\nafter: modify the access to fields defined in all models including ones in dependencies.\r\n\r\nSuppose `Cow` is defined in target(app) project, and `Cat` is defined in dependency project.\r\n\r\n```\r\n        Cow cow = new Cow();\r\n        cow.setName(\"mooo\");\r\n        realm.beginTransaction();\r\n        cow = realm.copyToRealm(cow);\r\n        realm.commitTransaction();\r\n\r\n        Cat cat = new Cat();\r\n        cat.setName(\"doraemon\");\r\n        realm.beginTransaction();\r\n        cat = realm.copyToRealm(cat);\r\n        realm.commitTransaction();\r\n\r\n        Log.d(\"FOO\", \"cow.getName(): \" + cow.getName());\r\n        Log.d(\"FOO\", \"cow.name: \" + cow.name);\r\n        Log.d(\"FOO\", \"cat.getName(): \" + cat.getName());\r\n        Log.d(\"FOO\", \"cat.name: \" + cat.name);\r\n```\r\n\r\nbefore: \r\n```\r\nFOO     : cow.getName(): mooo\r\nFOO     : cow.name: mooo\r\nFOO     : cat.getName(): doraemon\r\nFOO     : cat.name: null\r\n```\r\n\r\nafter:\r\n```\r\nFOO     : cow.getName(): mooo\r\nFOO     : cow.name: mooo\r\nFOO     : cat.getName(): doraemon\r\nFOO     : cat.name: doraemon\r\n```\r\n\r\nplease review this @realm/java @emanuelez ","created_at":"2016-03-09T18:01:42Z","updated_at":"2016-03-10T09:35:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a03de67ee701e0ef4837d13dc7d660ad0b890ea4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-java/pulls/2406/commits","review_comments_url":"https://api.github.com/repos/realm/realm-java/pulls/2406/comments","review_comment_url":"https://api.github.com/repos/realm/realm-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/2406/comments","statuses_url":"https://api.github.com/repos/realm/realm-java/statuses/d123d059dc38a4096f8208030cd00806fa263f30","head":{"label":"realm:my/transform_accesses_to_models_in_library_projects","ref":"my/transform_accesses_to_models_in_library_projects","sha":"d123d059dc38a4096f8208030cd00806fa263f30","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4084908,"name":"realm-java","full_name":"realm/realm-java","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-java","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-java","forks_url":"https://api.github.com/repos/realm/realm-java/forks","keys_url":"https://api.github.com/repos/realm/realm-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-java/teams","hooks_url":"https://api.github.com/repos/realm/realm-java/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-java/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-java/events","assignees_url":"https://api.github.com/repos/realm/realm-java/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-java/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-java/tags","blobs_url":"https://api.github.com/repos/realm/realm-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-java/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-java/languages","stargazers_url":"https://api.github.com/repos/realm/realm-java/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-java/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-java/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-java/subscription","commits_url":"https://api.github.com/repos/realm/realm-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-java/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-java/merges","archive_url":"https://api.github.com/repos/realm/realm-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-java/downloads","issues_url":"https://api.github.com/repos/realm/realm-java/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-java/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-java/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-java/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-java/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-java/deployments","created_at":"2012-04-20T09:18:42Z","updated_at":"2016-03-10T06:00:58Z","pushed_at":"2016-03-10T09:34:16Z","git_url":"git://github.com/realm/realm-java.git","ssh_url":"git@github.com:realm/realm-java.git","clone_url":"https://github.com/realm/realm-java.git","svn_url":"https://github.com/realm/realm-java","homepage":"http://realm.io","size":46651,"stargazers_count":3872,"watchers_count":3872,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":457,"mirror_url":null,"open_issues_count":209,"forks":457,"open_issues":209,"watchers":3872,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"a910b48261374a96bafab65e5b43d5cc8897a1e2","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4084908,"name":"realm-java","full_name":"realm/realm-java","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-java","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-java","forks_url":"https://api.github.com/repos/realm/realm-java/forks","keys_url":"https://api.github.com/repos/realm/realm-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-java/teams","hooks_url":"https://api.github.com/repos/realm/realm-java/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-java/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-java/events","assignees_url":"https://api.github.com/repos/realm/realm-java/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-java/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-java/tags","blobs_url":"https://api.github.com/repos/realm/realm-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-java/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-java/languages","stargazers_url":"https://api.github.com/repos/realm/realm-java/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-java/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-java/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-java/subscription","commits_url":"https://api.github.com/repos/realm/realm-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-java/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-java/merges","archive_url":"https://api.github.com/repos/realm/realm-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-java/downloads","issues_url":"https://api.github.com/repos/realm/realm-java/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-java/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-java/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-java/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-java/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-java/deployments","created_at":"2012-04-20T09:18:42Z","updated_at":"2016-03-10T06:00:58Z","pushed_at":"2016-03-10T09:34:16Z","git_url":"git://github.com/realm/realm-java.git","ssh_url":"git@github.com:realm/realm-java.git","clone_url":"https://github.com/realm/realm-java.git","svn_url":"https://github.com/realm/realm-java","homepage":"http://realm.io","size":46651,"stargazers_count":3872,"watchers_count":3872,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":457,"mirror_url":null,"open_issues_count":209,"forks":457,"open_issues":209,"watchers":3872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-java/pulls/2406"},"html":{"href":"https://github.com/realm/realm-java/pull/2406"},"issue":{"href":"https://api.github.com/repos/realm/realm-java/issues/2406"},"comments":{"href":"https://api.github.com/repos/realm/realm-java/issues/2406/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-java/pulls/2406/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-java/pulls/2406/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-java/statuses/d123d059dc38a4096f8208030cd00806fa263f30"}}}}