{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-java/pulls/comments/206477656","pull_request_review_id":141895552,"id":206477656,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjQ3NzY1Ng==","diff_hunk":"@@ -123,41 +125,46 @@ class RealmTransformer(val project: Project) : Transform() {\n      * @param inputModelClasses a list of ctClasses describing the Realm models\n      */\n     private fun sendAnalytics(inputs: Collection<TransformInput>, outputModelClasses: Set<CtClass>) {\n-        val disableAnalytics: Boolean = \"true\".equals(System.getenv()[\"REALM_DISABLE_ANALYTICS\"])\n-        if (inputs.isEmpty() || disableAnalytics) {\n-            // Don't send analytics for incremental builds or if they have ben explicitly disabled.\n-            return\n-        }\n+        try {\n+            val disableAnalytics: Boolean = \"true\".equals(System.getenv()[\"REALM_DISABLE_ANALYTICS\"])","path":"realm-transformer/src/main/kotlin/io/realm/transformer/RealmTransformer.kt","position":19,"original_position":19,"commit_id":"5d595ae7aa23199c5d0a7e1549922ded9e5df5a9","original_commit_id":"5d595ae7aa23199c5d0a7e1549922ded9e5df5a9","user":{"login":"nhachicha","id":1793238,"node_id":"MDQ6VXNlcjE3OTMyMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1793238?v=4","gravatar_id":"","url":"https://api.github.com/users/nhachicha","html_url":"https://github.com/nhachicha","followers_url":"https://api.github.com/users/nhachicha/followers","following_url":"https://api.github.com/users/nhachicha/following{/other_user}","gists_url":"https://api.github.com/users/nhachicha/gists{/gist_id}","starred_url":"https://api.github.com/users/nhachicha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhachicha/subscriptions","organizations_url":"https://api.github.com/users/nhachicha/orgs","repos_url":"https://api.github.com/users/nhachicha/repos","events_url":"https://api.github.com/users/nhachicha/events{/privacy}","received_events_url":"https://api.github.com/users/nhachicha/received_events","type":"User","site_admin":false},"body":"maybe use `equalsIgnorecase` for extra safety ","created_at":"2018-07-31T10:40:07Z","updated_at":"2018-07-31T10:48:38Z","html_url":"https://github.com/realm/realm-java/pull/6087#discussion_r206477656","pull_request_url":"https://api.github.com/repos/realm/realm-java/pulls/6087","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-java/pulls/comments/206477656"},"html":{"href":"https://github.com/realm/realm-java/pull/6087#discussion_r206477656"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-java/pulls/6087"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-java/pulls/6087","id":204767880,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NzY3ODgw","html_url":"https://github.com/realm/realm-java/pull/6087","diff_url":"https://github.com/realm/realm-java/pull/6087.diff","patch_url":"https://github.com/realm/realm-java/pull/6087.patch","issue_url":"https://api.github.com/repos/realm/realm-java/issues/6087","number":6087,"state":"open","locked":false,"title":"Fix nullpointer when using RealmTransformer","user":{"login":"cmelchior","id":406066,"node_id":"MDQ6VXNlcjQwNjA2Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/406066?v=4","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"body":"Closes #6082 \r\n\r\nConverts the util functions to Kotlin and added extra crash safety when sending analytics (basically, we should never crash no matter what goes wrong). Now all exceptions are just silently logged to the debug log.","created_at":"2018-07-30T11:00:50Z","updated_at":"2018-07-31T10:48:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5633f76bd1d66049c8ba714c55016bbaaf25a39","assignee":{"login":"cmelchior","id":406066,"node_id":"MDQ6VXNlcjQwNjA2Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/406066?v=4","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"assignees":[{"login":"cmelchior","id":406066,"node_id":"MDQ6VXNlcjQwNjA2Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/406066?v=4","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-java/pulls/6087/commits","review_comments_url":"https://api.github.com/repos/realm/realm-java/pulls/6087/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/6087/comments","statuses_url":"https://api.github.com/repos/realm/realm-java/statuses/5d595ae7aa23199c5d0a7e1549922ded9e5df5a9","head":{"label":"realm:cm/bug/missing-target-sdk","ref":"cm/bug/missing-target-sdk","sha":"5d595ae7aa23199c5d0a7e1549922ded9e5df5a9","user":{"login":"realm","id":7575099,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NzUwOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/7575099?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0MDg0OTA4","name":"realm-java","full_name":"realm/realm-java","owner":{"login":"realm","id":7575099,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NzUwOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/7575099?v=4","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":"2018-07-31T08:04:40Z","pushed_at":"2018-07-30T17:08:03Z","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":56518,"stargazers_count":9757,"watchers_count":9757,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1535,"mirror_url":null,"archived":false,"open_issues_count":398,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1535,"open_issues":398,"watchers":9757,"default_branch":"master"}},"base":{"label":"realm:releases","ref":"releases","sha":"e9a77112061b975193e6ee9239bbfe7fa5e61135","user":{"login":"realm","id":7575099,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NzUwOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/7575099?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0MDg0OTA4","name":"realm-java","full_name":"realm/realm-java","owner":{"login":"realm","id":7575099,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NzUwOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/7575099?v=4","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":"2018-07-31T08:04:40Z","pushed_at":"2018-07-30T17:08:03Z","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":56518,"stargazers_count":9757,"watchers_count":9757,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1535,"mirror_url":null,"archived":false,"open_issues_count":398,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1535,"open_issues":398,"watchers":9757,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-java/pulls/6087"},"html":{"href":"https://github.com/realm/realm-java/pull/6087"},"issue":{"href":"https://api.github.com/repos/realm/realm-java/issues/6087"},"comments":{"href":"https://api.github.com/repos/realm/realm-java/issues/6087/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-java/pulls/6087/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/6087/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-java/statuses/5d595ae7aa23199c5d0a7e1549922ded9e5df5a9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nhachicha"}}