{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-mdm/pulls/comments/51693151","id":51693151,"diff_hunk":"@@ -108,25 +109,30 @@ public Message ConfigureSettings(TenantConfiguration configuration) throws Windo\n     @GET\n     public TenantConfiguration getConfiguration() throws WindowsConfigurationException {\n         String msg;\n-        TenantConfiguration tenantConfiguration = null;\n+        TenantConfiguration tenantConfiguration;\n+        List<ConfigurationEntry> configs;\n         try {\n-            if (WindowsAPIUtils.getDeviceManagementService().\n-                    getConfiguration(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS) != null) {\n-                tenantConfiguration = WindowsAPIUtils.getDeviceManagementService().\n+            tenantConfiguration = WindowsAPIUtils.getDeviceManagementService().\n                     getConfiguration(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS);\n-            List<ConfigurationEntry> configs = tenantConfiguration.getConfiguration();\n+            if(tenantConfiguration != null) {\n+                configs = tenantConfiguration.getConfiguration();\n+            } else {\n+                tenantConfiguration = new TenantConfiguration();\n+                configs = new ArrayList<>();\n+            }\n+\n             ConfigurationEntry entry = new ConfigurationEntry();\n             License license = WindowsAPIUtils.getDeviceManagementService().getLicense(\n-                    DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS, PluginConstants.\n-                            TenantConfigProperties.LANGUAGE_US);\n-            if(license != null) {\n+                    DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS,\n+                    PluginConstants.TenantConfigProperties.LANGUAGE_US);\n+\n+            if(license != null && configs != null) {","path":"modules/mobile-agents/windows/jax-rs/src/main/java/org/wso2/carbon/mdm/mobileservices/windows/services/configurationmgtservice/ConfigurationMgtService.java","position":37,"original_position":37,"commit_id":"06d753f88cb330e99716bf8a4e2a80a3abc50a6f","original_commit_id":"06d753f88cb330e99716bf8a4e2a80a3abc50a6f","user":{"login":"hasuniea","id":12996810,"avatar_url":"https://avatars.githubusercontent.com/u/12996810?v=3","gravatar_id":"","url":"https://api.github.com/users/hasuniea","html_url":"https://github.com/hasuniea","followers_url":"https://api.github.com/users/hasuniea/followers","following_url":"https://api.github.com/users/hasuniea/following{/other_user}","gists_url":"https://api.github.com/users/hasuniea/gists{/gist_id}","starred_url":"https://api.github.com/users/hasuniea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasuniea/subscriptions","organizations_url":"https://api.github.com/users/hasuniea/orgs","repos_url":"https://api.github.com/users/hasuniea/repos","events_url":"https://api.github.com/users/hasuniea/events{/privacy}","received_events_url":"https://api.github.com/users/hasuniea/received_events","type":"User","site_admin":false},"body":"fixed from https://github.com/wso2/product-mdm/pull/156","created_at":"2016-02-03T08:53:12Z","updated_at":"2016-02-03T08:53:12Z","html_url":"https://github.com/wso2/product-mdm/pull/111#discussion_r51693151","pull_request_url":"https://api.github.com/repos/wso2/product-mdm/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-mdm/pulls/comments/51693151"},"html":{"href":"https://github.com/wso2/product-mdm/pull/111#discussion_r51693151"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-mdm/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-mdm/pulls/111","id":52846174,"html_url":"https://github.com/wso2/product-mdm/pull/111","diff_url":"https://github.com/wso2/product-mdm/pull/111.diff","patch_url":"https://github.com/wso2/product-mdm/pull/111.patch","issue_url":"https://api.github.com/repos/wso2/product-mdm/issues/111","number":111,"state":"closed","locked":false,"title":"Fixed issue in getting license agreement","user":{"login":"hasuniea","id":12996810,"avatar_url":"https://avatars.githubusercontent.com/u/12996810?v=3","gravatar_id":"","url":"https://api.github.com/users/hasuniea","html_url":"https://github.com/hasuniea","followers_url":"https://api.github.com/users/hasuniea/followers","following_url":"https://api.github.com/users/hasuniea/following{/other_user}","gists_url":"https://api.github.com/users/hasuniea/gists{/gist_id}","starred_url":"https://api.github.com/users/hasuniea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasuniea/subscriptions","organizations_url":"https://api.github.com/users/hasuniea/orgs","repos_url":"https://api.github.com/users/hasuniea/repos","events_url":"https://api.github.com/users/hasuniea/events{/privacy}","received_events_url":"https://api.github.com/users/hasuniea/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-07T13:47:25Z","updated_at":"2016-02-03T08:53:12Z","closed_at":"2015-12-10T16:49:06Z","merged_at":"2015-12-10T16:49:06Z","merge_commit_sha":"352a030c5fc6d8d358cac973cd93a809ecb18773","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-mdm/pulls/111/commits","review_comments_url":"https://api.github.com/repos/wso2/product-mdm/pulls/111/comments","review_comment_url":"https://api.github.com/repos/wso2/product-mdm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-mdm/issues/111/comments","statuses_url":"https://api.github.com/repos/wso2/product-mdm/statuses/06d753f88cb330e99716bf8a4e2a80a3abc50a6f","head":{"label":"hasuniea:master","ref":"master","sha":"06d753f88cb330e99716bf8a4e2a80a3abc50a6f","user":{"login":"hasuniea","id":12996810,"avatar_url":"https://avatars.githubusercontent.com/u/12996810?v=3","gravatar_id":"","url":"https://api.github.com/users/hasuniea","html_url":"https://github.com/hasuniea","followers_url":"https://api.github.com/users/hasuniea/followers","following_url":"https://api.github.com/users/hasuniea/following{/other_user}","gists_url":"https://api.github.com/users/hasuniea/gists{/gist_id}","starred_url":"https://api.github.com/users/hasuniea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasuniea/subscriptions","organizations_url":"https://api.github.com/users/hasuniea/orgs","repos_url":"https://api.github.com/users/hasuniea/repos","events_url":"https://api.github.com/users/hasuniea/events{/privacy}","received_events_url":"https://api.github.com/users/hasuniea/received_events","type":"User","site_admin":false},"repo":{"id":41124441,"name":"product-mdm","full_name":"hasuniea/product-mdm","owner":{"login":"hasuniea","id":12996810,"avatar_url":"https://avatars.githubusercontent.com/u/12996810?v=3","gravatar_id":"","url":"https://api.github.com/users/hasuniea","html_url":"https://github.com/hasuniea","followers_url":"https://api.github.com/users/hasuniea/followers","following_url":"https://api.github.com/users/hasuniea/following{/other_user}","gists_url":"https://api.github.com/users/hasuniea/gists{/gist_id}","starred_url":"https://api.github.com/users/hasuniea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasuniea/subscriptions","organizations_url":"https://api.github.com/users/hasuniea/orgs","repos_url":"https://api.github.com/users/hasuniea/repos","events_url":"https://api.github.com/users/hasuniea/events{/privacy}","received_events_url":"https://api.github.com/users/hasuniea/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hasuniea/product-mdm","description":"","fork":true,"url":"https://api.github.com/repos/hasuniea/product-mdm","forks_url":"https://api.github.com/repos/hasuniea/product-mdm/forks","keys_url":"https://api.github.com/repos/hasuniea/product-mdm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hasuniea/product-mdm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hasuniea/product-mdm/teams","hooks_url":"https://api.github.com/repos/hasuniea/product-mdm/hooks","issue_events_url":"https://api.github.com/repos/hasuniea/product-mdm/issues/events{/number}","events_url":"https://api.github.com/repos/hasuniea/product-mdm/events","assignees_url":"https://api.github.com/repos/hasuniea/product-mdm/assignees{/user}","branches_url":"https://api.github.com/repos/hasuniea/product-mdm/branches{/branch}","tags_url":"https://api.github.com/repos/hasuniea/product-mdm/tags","blobs_url":"https://api.github.com/repos/hasuniea/product-mdm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hasuniea/product-mdm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hasuniea/product-mdm/git/refs{/sha}","trees_url":"https://api.github.com/repos/hasuniea/product-mdm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hasuniea/product-mdm/statuses/{sha}","languages_url":"https://api.github.com/repos/hasuniea/product-mdm/languages","stargazers_url":"https://api.github.com/repos/hasuniea/product-mdm/stargazers","contributors_url":"https://api.github.com/repos/hasuniea/product-mdm/contributors","subscribers_url":"https://api.github.com/repos/hasuniea/product-mdm/subscribers","subscription_url":"https://api.github.com/repos/hasuniea/product-mdm/subscription","commits_url":"https://api.github.com/repos/hasuniea/product-mdm/commits{/sha}","git_commits_url":"https://api.github.com/repos/hasuniea/product-mdm/git/commits{/sha}","comments_url":"https://api.github.com/repos/hasuniea/product-mdm/comments{/number}","issue_comment_url":"https://api.github.com/repos/hasuniea/product-mdm/issues/comments{/number}","contents_url":"https://api.github.com/repos/hasuniea/product-mdm/contents/{+path}","compare_url":"https://api.github.com/repos/hasuniea/product-mdm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hasuniea/product-mdm/merges","archive_url":"https://api.github.com/repos/hasuniea/product-mdm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hasuniea/product-mdm/downloads","issues_url":"https://api.github.com/repos/hasuniea/product-mdm/issues{/number}","pulls_url":"https://api.github.com/repos/hasuniea/product-mdm/pulls{/number}","milestones_url":"https://api.github.com/repos/hasuniea/product-mdm/milestones{/number}","notifications_url":"https://api.github.com/repos/hasuniea/product-mdm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hasuniea/product-mdm/labels{/name}","releases_url":"https://api.github.com/repos/hasuniea/product-mdm/releases{/id}","deployments_url":"https://api.github.com/repos/hasuniea/product-mdm/deployments","created_at":"2015-08-21T00:04:21Z","updated_at":"2016-01-20T05:48:45Z","pushed_at":"2016-02-01T07:49:29Z","git_url":"git://github.com/hasuniea/product-mdm.git","ssh_url":"git@github.com:hasuniea/product-mdm.git","clone_url":"https://github.com/hasuniea/product-mdm.git","svn_url":"https://github.com/hasuniea/product-mdm","homepage":null,"size":72558,"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:master","ref":"master","sha":"738adc54e8e9bc4ce8ccd241ebfb5e9b2d9eca98","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":29459213,"name":"product-mdm","full_name":"wso2/product-mdm","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/product-mdm","description":"","fork":false,"url":"https://api.github.com/repos/wso2/product-mdm","forks_url":"https://api.github.com/repos/wso2/product-mdm/forks","keys_url":"https://api.github.com/repos/wso2/product-mdm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-mdm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-mdm/teams","hooks_url":"https://api.github.com/repos/wso2/product-mdm/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-mdm/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-mdm/events","assignees_url":"https://api.github.com/repos/wso2/product-mdm/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-mdm/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-mdm/tags","blobs_url":"https://api.github.com/repos/wso2/product-mdm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-mdm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-mdm/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-mdm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-mdm/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-mdm/languages","stargazers_url":"https://api.github.com/repos/wso2/product-mdm/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-mdm/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-mdm/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-mdm/subscription","commits_url":"https://api.github.com/repos/wso2/product-mdm/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-mdm/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-mdm/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-mdm/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-mdm/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-mdm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-mdm/merges","archive_url":"https://api.github.com/repos/wso2/product-mdm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-mdm/downloads","issues_url":"https://api.github.com/repos/wso2/product-mdm/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-mdm/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-mdm/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-mdm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-mdm/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-mdm/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/product-mdm/deployments","created_at":"2015-01-19T07:36:01Z","updated_at":"2016-02-02T22:30:14Z","pushed_at":"2016-02-03T08:22:35Z","git_url":"git://github.com/wso2/product-mdm.git","ssh_url":"git@github.com:wso2/product-mdm.git","clone_url":"https://github.com/wso2/product-mdm.git","svn_url":"https://github.com/wso2/product-mdm","homepage":null,"size":72765,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":5,"forks":34,"open_issues":5,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-mdm/pulls/111"},"html":{"href":"https://github.com/wso2/product-mdm/pull/111"},"issue":{"href":"https://api.github.com/repos/wso2/product-mdm/issues/111"},"comments":{"href":"https://api.github.com/repos/wso2/product-mdm/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-mdm/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-mdm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-mdm/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-mdm/statuses/06d753f88cb330e99716bf8a4e2a80a3abc50a6f"}}}}