{"action":"created","comment":{"url":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/comments/85182722","pull_request_review_id":5912794,"id":85182722,"diff_hunk":"@@ -479,6 +480,56 @@ private void createJobVariables(XMLStreamReader cursorVariables)\n         return variablesMap;\n     }\n \n+     /**\n+      * Create a map of variables from XML variables.\n+      * Leave the method with the cursor at the end of 'ELEMENT_VARIABLES' tag\n+      *\n+      * @param cursorVariables the streamReader with the cursor on the 'ELEMENT_VARIABLES' tag.\n+      * @return the map in which the variables were added.\n+      * @throws JobCreationException\n+      */\n+      private Map<String, TaskVariable> createTaskVariables(XMLStreamReader cursorVariables) \n+              throws JobCreationException {\n+         Map<String, TaskVariable> variablesMap = new HashMap<>();\n+         try {\n+             int eventType;\n+             while (cursorVariables.hasNext()) {\n+                 eventType = cursorVariables.next();\n+                 switch (eventType) {\n+                     case XMLEvent.START_ELEMENT:\n+                         if (XMLTags.VARIABLE.matches(cursorVariables.getLocalName())) {\n+                             Map<String, String> attributesAsMap = getAttributesAsMap(cursorVariables);\n+\n+                             //TODO checks for data consistency\n+                             TaskVariable taskVariable = new TaskVariable();\n+                             taskVariable.setName(attributesAsMap.get(XMLAttributes.VARIABLE_NAME.getXMLName()));\n+                             taskVariable.setValue(attributesAsMap.get(XMLAttributes.VARIABLE_VALUE.getXMLName()));\n+                             taskVariable.setModel(attributesAsMap.get(XMLAttributes.VARIABLE_MODEL.getXMLName()));\n+                             taskVariable.setJobInherited(Boolean.valueOf(attributesAsMap.get(XMLAttributes.VARIABLE_JOB_INHERITED.getXMLName())));\n+\n+                             variablesMap.put(taskVariable.getName(), taskVariable);\n+                         }\n+                         break;\n+                     case XMLEvent.END_ELEMENT:\n+                         if (XMLTags.VARIABLES.matches(cursorVariables.getLocalName())) {","path":"scheduler/scheduler-api/src/main/java/org/ow2/proactive/scheduler/common/job/factories/StaxJobFactory.java","position":43,"original_position":43,"commit_id":"adcb264259ca88662bcf40030a7987e97ee48afd","original_commit_id":"adcb264259ca88662bcf40030a7987e97ee48afd","user":{"login":"sonarqube-activeeon","id":14940028,"avatar_url":"https://avatars.githubusercontent.com/u/14940028?v=3","gravatar_id":"","url":"https://api.github.com/users/sonarqube-activeeon","html_url":"https://github.com/sonarqube-activeeon","followers_url":"https://api.github.com/users/sonarqube-activeeon/followers","following_url":"https://api.github.com/users/sonarqube-activeeon/following{/other_user}","gists_url":"https://api.github.com/users/sonarqube-activeeon/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarqube-activeeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarqube-activeeon/subscriptions","organizations_url":"https://api.github.com/users/sonarqube-activeeon/orgs","repos_url":"https://api.github.com/users/sonarqube-activeeon/repos","events_url":"https://api.github.com/users/sonarqube-activeeon/events{/privacy}","received_events_url":"https://api.github.com/users/sonarqube-activeeon/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Refactor this code to not nest more than 3 if/for/while/switch/try statements. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://master.ci.activeeon.com:9000/coding_rules#rule_key=squid%3AS134)\n","created_at":"2016-10-26T17:58:19Z","updated_at":"2016-10-26T17:58:19Z","html_url":"https://github.com/ow2-proactive/scheduling/pull/2710#discussion_r85182722","pull_request_url":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710","_links":{"self":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/comments/85182722"},"html":{"href":"https://github.com/ow2-proactive/scheduling/pull/2710#discussion_r85182722"},"pull_request":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710"}}},"pull_request":{"url":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710","id":90777472,"html_url":"https://github.com/ow2-proactive/scheduling/pull/2710","diff_url":"https://github.com/ow2-proactive/scheduling/pull/2710.diff","patch_url":"https://github.com/ow2-proactive/scheduling/pull/2710.patch","issue_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2710","number":2710,"state":"open","locked":false,"title":"XML model update for task variables","user":{"login":"laurianed","id":13423780,"avatar_url":"https://avatars.githubusercontent.com/u/13423780?v=3","gravatar_id":"","url":"https://api.github.com/users/laurianed","html_url":"https://github.com/laurianed","followers_url":"https://api.github.com/users/laurianed/followers","following_url":"https://api.github.com/users/laurianed/following{/other_user}","gists_url":"https://api.github.com/users/laurianed/gists{/gist_id}","starred_url":"https://api.github.com/users/laurianed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurianed/subscriptions","organizations_url":"https://api.github.com/users/laurianed/orgs","repos_url":"https://api.github.com/users/laurianed/repos","events_url":"https://api.github.com/users/laurianed/events{/privacy}","received_events_url":"https://api.github.com/users/laurianed/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-25T10:12:11Z","updated_at":"2016-10-26T17:58:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63d26a90b472fa9131d4743a54c1553490a77375","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710/commits","review_comments_url":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710/comments","review_comment_url":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2710/comments","statuses_url":"https://api.github.com/repos/ow2-proactive/scheduling/statuses/adcb264259ca88662bcf40030a7987e97ee48afd","head":{"label":"laurianed:master","ref":"master","sha":"adcb264259ca88662bcf40030a7987e97ee48afd","user":{"login":"laurianed","id":13423780,"avatar_url":"https://avatars.githubusercontent.com/u/13423780?v=3","gravatar_id":"","url":"https://api.github.com/users/laurianed","html_url":"https://github.com/laurianed","followers_url":"https://api.github.com/users/laurianed/followers","following_url":"https://api.github.com/users/laurianed/following{/other_user}","gists_url":"https://api.github.com/users/laurianed/gists{/gist_id}","starred_url":"https://api.github.com/users/laurianed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurianed/subscriptions","organizations_url":"https://api.github.com/users/laurianed/orgs","repos_url":"https://api.github.com/users/laurianed/repos","events_url":"https://api.github.com/users/laurianed/events{/privacy}","received_events_url":"https://api.github.com/users/laurianed/received_events","type":"User","site_admin":false},"repo":{"id":67593238,"name":"scheduling","full_name":"laurianed/scheduling","owner":{"login":"laurianed","id":13423780,"avatar_url":"https://avatars.githubusercontent.com/u/13423780?v=3","gravatar_id":"","url":"https://api.github.com/users/laurianed","html_url":"https://github.com/laurianed","followers_url":"https://api.github.com/users/laurianed/followers","following_url":"https://api.github.com/users/laurianed/following{/other_user}","gists_url":"https://api.github.com/users/laurianed/gists{/gist_id}","starred_url":"https://api.github.com/users/laurianed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurianed/subscriptions","organizations_url":"https://api.github.com/users/laurianed/orgs","repos_url":"https://api.github.com/users/laurianed/repos","events_url":"https://api.github.com/users/laurianed/events{/privacy}","received_events_url":"https://api.github.com/users/laurianed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/laurianed/scheduling","description":"Multi-platform Scheduling and Workflows Engine","fork":true,"url":"https://api.github.com/repos/laurianed/scheduling","forks_url":"https://api.github.com/repos/laurianed/scheduling/forks","keys_url":"https://api.github.com/repos/laurianed/scheduling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laurianed/scheduling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laurianed/scheduling/teams","hooks_url":"https://api.github.com/repos/laurianed/scheduling/hooks","issue_events_url":"https://api.github.com/repos/laurianed/scheduling/issues/events{/number}","events_url":"https://api.github.com/repos/laurianed/scheduling/events","assignees_url":"https://api.github.com/repos/laurianed/scheduling/assignees{/user}","branches_url":"https://api.github.com/repos/laurianed/scheduling/branches{/branch}","tags_url":"https://api.github.com/repos/laurianed/scheduling/tags","blobs_url":"https://api.github.com/repos/laurianed/scheduling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laurianed/scheduling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laurianed/scheduling/git/refs{/sha}","trees_url":"https://api.github.com/repos/laurianed/scheduling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laurianed/scheduling/statuses/{sha}","languages_url":"https://api.github.com/repos/laurianed/scheduling/languages","stargazers_url":"https://api.github.com/repos/laurianed/scheduling/stargazers","contributors_url":"https://api.github.com/repos/laurianed/scheduling/contributors","subscribers_url":"https://api.github.com/repos/laurianed/scheduling/subscribers","subscription_url":"https://api.github.com/repos/laurianed/scheduling/subscription","commits_url":"https://api.github.com/repos/laurianed/scheduling/commits{/sha}","git_commits_url":"https://api.github.com/repos/laurianed/scheduling/git/commits{/sha}","comments_url":"https://api.github.com/repos/laurianed/scheduling/comments{/number}","issue_comment_url":"https://api.github.com/repos/laurianed/scheduling/issues/comments{/number}","contents_url":"https://api.github.com/repos/laurianed/scheduling/contents/{+path}","compare_url":"https://api.github.com/repos/laurianed/scheduling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laurianed/scheduling/merges","archive_url":"https://api.github.com/repos/laurianed/scheduling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laurianed/scheduling/downloads","issues_url":"https://api.github.com/repos/laurianed/scheduling/issues{/number}","pulls_url":"https://api.github.com/repos/laurianed/scheduling/pulls{/number}","milestones_url":"https://api.github.com/repos/laurianed/scheduling/milestones{/number}","notifications_url":"https://api.github.com/repos/laurianed/scheduling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laurianed/scheduling/labels{/name}","releases_url":"https://api.github.com/repos/laurianed/scheduling/releases{/id}","deployments_url":"https://api.github.com/repos/laurianed/scheduling/deployments","created_at":"2016-09-07T09:37:25Z","updated_at":"2016-09-07T09:37:31Z","pushed_at":"2016-10-26T14:38:39Z","git_url":"git://github.com/laurianed/scheduling.git","ssh_url":"git@github.com:laurianed/scheduling.git","clone_url":"https://github.com/laurianed/scheduling.git","svn_url":"https://github.com/laurianed/scheduling","homepage":"http://www.activeeon.com/workflows-scheduling","size":65738,"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":"master"}},"base":{"label":"ow2-proactive:master","ref":"master","sha":"c7f38cf53428a24e197f6e188e56fbc10198b153","user":{"login":"ow2-proactive","id":11553998,"avatar_url":"https://avatars.githubusercontent.com/u/11553998?v=3","gravatar_id":"","url":"https://api.github.com/users/ow2-proactive","html_url":"https://github.com/ow2-proactive","followers_url":"https://api.github.com/users/ow2-proactive/followers","following_url":"https://api.github.com/users/ow2-proactive/following{/other_user}","gists_url":"https://api.github.com/users/ow2-proactive/gists{/gist_id}","starred_url":"https://api.github.com/users/ow2-proactive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ow2-proactive/subscriptions","organizations_url":"https://api.github.com/users/ow2-proactive/orgs","repos_url":"https://api.github.com/users/ow2-proactive/repos","events_url":"https://api.github.com/users/ow2-proactive/events{/privacy}","received_events_url":"https://api.github.com/users/ow2-proactive/received_events","type":"Organization","site_admin":false},"repo":{"id":35725079,"name":"scheduling","full_name":"ow2-proactive/scheduling","owner":{"login":"ow2-proactive","id":11553998,"avatar_url":"https://avatars.githubusercontent.com/u/11553998?v=3","gravatar_id":"","url":"https://api.github.com/users/ow2-proactive","html_url":"https://github.com/ow2-proactive","followers_url":"https://api.github.com/users/ow2-proactive/followers","following_url":"https://api.github.com/users/ow2-proactive/following{/other_user}","gists_url":"https://api.github.com/users/ow2-proactive/gists{/gist_id}","starred_url":"https://api.github.com/users/ow2-proactive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ow2-proactive/subscriptions","organizations_url":"https://api.github.com/users/ow2-proactive/orgs","repos_url":"https://api.github.com/users/ow2-proactive/repos","events_url":"https://api.github.com/users/ow2-proactive/events{/privacy}","received_events_url":"https://api.github.com/users/ow2-proactive/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ow2-proactive/scheduling","description":"Multi-platform Scheduling and Workflows Engine","fork":false,"url":"https://api.github.com/repos/ow2-proactive/scheduling","forks_url":"https://api.github.com/repos/ow2-proactive/scheduling/forks","keys_url":"https://api.github.com/repos/ow2-proactive/scheduling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ow2-proactive/scheduling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ow2-proactive/scheduling/teams","hooks_url":"https://api.github.com/repos/ow2-proactive/scheduling/hooks","issue_events_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/events{/number}","events_url":"https://api.github.com/repos/ow2-proactive/scheduling/events","assignees_url":"https://api.github.com/repos/ow2-proactive/scheduling/assignees{/user}","branches_url":"https://api.github.com/repos/ow2-proactive/scheduling/branches{/branch}","tags_url":"https://api.github.com/repos/ow2-proactive/scheduling/tags","blobs_url":"https://api.github.com/repos/ow2-proactive/scheduling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ow2-proactive/scheduling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ow2-proactive/scheduling/git/refs{/sha}","trees_url":"https://api.github.com/repos/ow2-proactive/scheduling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ow2-proactive/scheduling/statuses/{sha}","languages_url":"https://api.github.com/repos/ow2-proactive/scheduling/languages","stargazers_url":"https://api.github.com/repos/ow2-proactive/scheduling/stargazers","contributors_url":"https://api.github.com/repos/ow2-proactive/scheduling/contributors","subscribers_url":"https://api.github.com/repos/ow2-proactive/scheduling/subscribers","subscription_url":"https://api.github.com/repos/ow2-proactive/scheduling/subscription","commits_url":"https://api.github.com/repos/ow2-proactive/scheduling/commits{/sha}","git_commits_url":"https://api.github.com/repos/ow2-proactive/scheduling/git/commits{/sha}","comments_url":"https://api.github.com/repos/ow2-proactive/scheduling/comments{/number}","issue_comment_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/comments{/number}","contents_url":"https://api.github.com/repos/ow2-proactive/scheduling/contents/{+path}","compare_url":"https://api.github.com/repos/ow2-proactive/scheduling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ow2-proactive/scheduling/merges","archive_url":"https://api.github.com/repos/ow2-proactive/scheduling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ow2-proactive/scheduling/downloads","issues_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues{/number}","pulls_url":"https://api.github.com/repos/ow2-proactive/scheduling/pulls{/number}","milestones_url":"https://api.github.com/repos/ow2-proactive/scheduling/milestones{/number}","notifications_url":"https://api.github.com/repos/ow2-proactive/scheduling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ow2-proactive/scheduling/labels{/name}","releases_url":"https://api.github.com/repos/ow2-proactive/scheduling/releases{/id}","deployments_url":"https://api.github.com/repos/ow2-proactive/scheduling/deployments","created_at":"2015-05-16T13:38:55Z","updated_at":"2016-10-24T10:08:29Z","pushed_at":"2016-10-26T16:25:13Z","git_url":"git://github.com/ow2-proactive/scheduling.git","ssh_url":"git@github.com:ow2-proactive/scheduling.git","clone_url":"https://github.com/ow2-proactive/scheduling.git","svn_url":"https://github.com/ow2-proactive/scheduling","homepage":"http://www.activeeon.com/workflows-scheduling","size":66262,"stargazers_count":17,"watchers_count":17,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":156,"forks":20,"open_issues":156,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710"},"html":{"href":"https://github.com/ow2-proactive/scheduling/pull/2710"},"issue":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2710"},"comments":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2710/comments"},"review_comments":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710/comments"},"review_comment":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/pulls/2710/commits"},"statuses":{"href":"https://api.github.com/repos/ow2-proactive/scheduling/statuses/adcb264259ca88662bcf40030a7987e97ee48afd"}}}}
{"actor":{"display_login":"sonarqube-activeeon"}}