{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-store/pulls/comments/50118605","id":50118605,"diff_hunk":"@@ -44,6 +47,20 @@ public static String getTenantDomain() {\n \n \t}\n \n+\tpublic static String getTenantDomainFromTenantId(int tenantId) throws SocialActivityException{\n+\t\tString tenantDomainName = null;\n+\t\ttry {\n+\t\t\tUserRealmService realmService = (UserRealmService) PrivilegedCarbonContext.getThreadLocalCarbonContext().\n+\t\t\t\t\tgetOSGiService(UserRealmService.class);\n+\t\t\torg.wso2.carbon.user.api.TenantManager tenantManager = realmService.getTenantManager();\n+\t\t\ttenantDomainName = tenantManager.getTenant(tenantId).getDomain();","path":"modules/components/social/org.wso2.carbon.social.sql/src/main/java/org/wso2/carbon/social/sql/SocialUtil.java","position":21,"original_position":21,"commit_id":"f5b28f5723a585c677dc3d8ef189f813bd72253a","original_commit_id":"f5b28f5723a585c677dc3d8ef189f813bd72253a","user":{"login":"sajithab","id":11046571,"avatar_url":"https://avatars.githubusercontent.com/u/11046571?v=3","gravatar_id":"","url":"https://api.github.com/users/sajithab","html_url":"https://github.com/sajithab","followers_url":"https://api.github.com/users/sajithab/followers","following_url":"https://api.github.com/users/sajithab/following{/other_user}","gists_url":"https://api.github.com/users/sajithab/gists{/gist_id}","starred_url":"https://api.github.com/users/sajithab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajithab/subscriptions","organizations_url":"https://api.github.com/users/sajithab/orgs","repos_url":"https://api.github.com/users/sajithab/repos","events_url":"https://api.github.com/users/sajithab/events{/privacy}","received_events_url":"https://api.github.com/users/sajithab/received_events","type":"User","site_admin":false},"body":"realmService and tenantManager won't be null. If so it must rise before this point. If tenantManager.getTenant(tenantId) is null it will throw UserStoreException\r\n","created_at":"2016-01-19T14:38:07Z","updated_at":"2016-01-19T14:38:07Z","html_url":"https://github.com/wso2/carbon-store/pull/272#discussion_r50118605","pull_request_url":"https://api.github.com/repos/wso2/carbon-store/pulls/272","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-store/pulls/comments/50118605"},"html":{"href":"https://github.com/wso2/carbon-store/pull/272#discussion_r50118605"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-store/pulls/272"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-store/pulls/272","id":53274518,"html_url":"https://github.com/wso2/carbon-store/pull/272","diff_url":"https://github.com/wso2/carbon-store/pull/272.diff","patch_url":"https://github.com/wso2/carbon-store/pull/272.patch","issue_url":"https://api.github.com/repos/wso2/carbon-store/issues/272","number":272,"state":"closed","locked":false,"title":"Bug fixed APPM-1132","user":{"login":"sajithab","id":11046571,"avatar_url":"https://avatars.githubusercontent.com/u/11046571?v=3","gravatar_id":"","url":"https://api.github.com/users/sajithab","html_url":"https://github.com/sajithab","followers_url":"https://api.github.com/users/sajithab/followers","following_url":"https://api.github.com/users/sajithab/following{/other_user}","gists_url":"https://api.github.com/users/sajithab/gists{/gist_id}","starred_url":"https://api.github.com/users/sajithab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajithab/subscriptions","organizations_url":"https://api.github.com/users/sajithab/orgs","repos_url":"https://api.github.com/users/sajithab/repos","events_url":"https://api.github.com/users/sajithab/events{/privacy}","received_events_url":"https://api.github.com/users/sajithab/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-10T15:39:44Z","updated_at":"2016-01-19T14:38:07Z","closed_at":"2015-12-11T08:34:35Z","merged_at":"2015-12-11T08:34:35Z","merge_commit_sha":"f6b2c25f135f7bd4c3846b42e99a9a9b29e357c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-store/pulls/272/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-store/pulls/272/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-store/issues/272/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-store/statuses/f5b28f5723a585c677dc3d8ef189f813bd72253a","head":{"label":"sajithab:app-manager-4.2.0-kernel","ref":"app-manager-4.2.0-kernel","sha":"f5b28f5723a585c677dc3d8ef189f813bd72253a","user":{"login":"sajithab","id":11046571,"avatar_url":"https://avatars.githubusercontent.com/u/11046571?v=3","gravatar_id":"","url":"https://api.github.com/users/sajithab","html_url":"https://github.com/sajithab","followers_url":"https://api.github.com/users/sajithab/followers","following_url":"https://api.github.com/users/sajithab/following{/other_user}","gists_url":"https://api.github.com/users/sajithab/gists{/gist_id}","starred_url":"https://api.github.com/users/sajithab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajithab/subscriptions","organizations_url":"https://api.github.com/users/sajithab/orgs","repos_url":"https://api.github.com/users/sajithab/repos","events_url":"https://api.github.com/users/sajithab/events{/privacy}","received_events_url":"https://api.github.com/users/sajithab/received_events","type":"User","site_admin":false},"repo":{"id":45977526,"name":"carbon-store","full_name":"sajithab/carbon-store","owner":{"login":"sajithab","id":11046571,"avatar_url":"https://avatars.githubusercontent.com/u/11046571?v=3","gravatar_id":"","url":"https://api.github.com/users/sajithab","html_url":"https://github.com/sajithab","followers_url":"https://api.github.com/users/sajithab/followers","following_url":"https://api.github.com/users/sajithab/following{/other_user}","gists_url":"https://api.github.com/users/sajithab/gists{/gist_id}","starred_url":"https://api.github.com/users/sajithab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajithab/subscriptions","organizations_url":"https://api.github.com/users/sajithab/orgs","repos_url":"https://api.github.com/users/sajithab/repos","events_url":"https://api.github.com/users/sajithab/events{/privacy}","received_events_url":"https://api.github.com/users/sajithab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sajithab/carbon-store","description":"","fork":true,"url":"https://api.github.com/repos/sajithab/carbon-store","forks_url":"https://api.github.com/repos/sajithab/carbon-store/forks","keys_url":"https://api.github.com/repos/sajithab/carbon-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sajithab/carbon-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sajithab/carbon-store/teams","hooks_url":"https://api.github.com/repos/sajithab/carbon-store/hooks","issue_events_url":"https://api.github.com/repos/sajithab/carbon-store/issues/events{/number}","events_url":"https://api.github.com/repos/sajithab/carbon-store/events","assignees_url":"https://api.github.com/repos/sajithab/carbon-store/assignees{/user}","branches_url":"https://api.github.com/repos/sajithab/carbon-store/branches{/branch}","tags_url":"https://api.github.com/repos/sajithab/carbon-store/tags","blobs_url":"https://api.github.com/repos/sajithab/carbon-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sajithab/carbon-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sajithab/carbon-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/sajithab/carbon-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sajithab/carbon-store/statuses/{sha}","languages_url":"https://api.github.com/repos/sajithab/carbon-store/languages","stargazers_url":"https://api.github.com/repos/sajithab/carbon-store/stargazers","contributors_url":"https://api.github.com/repos/sajithab/carbon-store/contributors","subscribers_url":"https://api.github.com/repos/sajithab/carbon-store/subscribers","subscription_url":"https://api.github.com/repos/sajithab/carbon-store/subscription","commits_url":"https://api.github.com/repos/sajithab/carbon-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/sajithab/carbon-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/sajithab/carbon-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/sajithab/carbon-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/sajithab/carbon-store/contents/{+path}","compare_url":"https://api.github.com/repos/sajithab/carbon-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sajithab/carbon-store/merges","archive_url":"https://api.github.com/repos/sajithab/carbon-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sajithab/carbon-store/downloads","issues_url":"https://api.github.com/repos/sajithab/carbon-store/issues{/number}","pulls_url":"https://api.github.com/repos/sajithab/carbon-store/pulls{/number}","milestones_url":"https://api.github.com/repos/sajithab/carbon-store/milestones{/number}","notifications_url":"https://api.github.com/repos/sajithab/carbon-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sajithab/carbon-store/labels{/name}","releases_url":"https://api.github.com/repos/sajithab/carbon-store/releases{/id}","created_at":"2015-11-11T11:22:04Z","updated_at":"2016-01-11T08:44:32Z","pushed_at":"2016-01-11T14:23:40Z","git_url":"git://github.com/sajithab/carbon-store.git","ssh_url":"git@github.com:sajithab/carbon-store.git","clone_url":"https://github.com/sajithab/carbon-store.git","svn_url":"https://github.com/sajithab/carbon-store","homepage":null,"size":39707,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"master"}},"base":{"label":"wso2:app-manager-4.2.0-kernel","ref":"app-manager-4.2.0-kernel","sha":"ace0a03df1d5dd7510e749a062915e86ec1cc2bf","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":29664276,"name":"carbon-store","full_name":"wso2/carbon-store","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-store","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-store","forks_url":"https://api.github.com/repos/wso2/carbon-store/forks","keys_url":"https://api.github.com/repos/wso2/carbon-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-store/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-store/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-store/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-store/events","assignees_url":"https://api.github.com/repos/wso2/carbon-store/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-store/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-store/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-store/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-store/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-store/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-store/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-store/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-store/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-store/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-store/merges","archive_url":"https://api.github.com/repos/wso2/carbon-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-store/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-store/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-store/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-store/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-store/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-store/releases{/id}","created_at":"2015-01-22T06:23:33Z","updated_at":"2016-01-11T07:31:13Z","pushed_at":"2016-01-19T04:29:48Z","git_url":"git://github.com/wso2/carbon-store.git","ssh_url":"git@github.com:wso2/carbon-store.git","clone_url":"https://github.com/wso2/carbon-store.git","svn_url":"https://github.com/wso2/carbon-store","homepage":null,"size":40770,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":14,"forks":44,"open_issues":14,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-store/pulls/272"},"html":{"href":"https://github.com/wso2/carbon-store/pull/272"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-store/issues/272"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-store/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-store/pulls/272/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-store/pulls/272/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-store/statuses/f5b28f5723a585c677dc3d8ef189f813bd72253a"}}}}