{"action":"closed","number":652,"pull_request":{"url":"https://api.github.com/repos/apache/brooklyn-server/pulls/652","id":117562353,"html_url":"https://github.com/apache/brooklyn-server/pull/652","diff_url":"https://github.com/apache/brooklyn-server/pull/652.diff","patch_url":"https://github.com/apache/brooklyn-server/pull/652.patch","issue_url":"https://api.github.com/repos/apache/brooklyn-server/issues/652","number":652,"state":"closed","locked":false,"title":"BROOKLYN-489: Fix XmlUtil.xpath character encoding","user":{"login":"aledsage","id":593113,"avatar_url":"https://avatars1.githubusercontent.com/u/593113?v=3","gravatar_id":"","url":"https://api.github.com/users/aledsage","html_url":"https://github.com/aledsage","followers_url":"https://api.github.com/users/aledsage/followers","following_url":"https://api.github.com/users/aledsage/following{/other_user}","gists_url":"https://api.github.com/users/aledsage/gists{/gist_id}","starred_url":"https://api.github.com/users/aledsage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledsage/subscriptions","organizations_url":"https://api.github.com/users/aledsage/orgs","repos_url":"https://api.github.com/users/aledsage/repos","events_url":"https://api.github.com/users/aledsage/events{/privacy}","received_events_url":"https://api.github.com/users/aledsage/received_events","type":"User","site_admin":false},"body":"Be explicit to use UTF_8. Otherwise, on some environments (e.g. windows?) it could use a different encoding.\r\n\r\nSee https://issues.apache.org/jira/browse/BROOKLYN-489\r\n\r\nHowever, I'm struggling to test this. For @iyovcheva, the `XmlUtilTest` passed in her IDE. This included when we created another little test there to read the persisted state file that was failing (`qf4zems55y`, and call `XmlUtil.xpath`). Maybe there's something different about the character encodings when running brooklyn in karaf, versus in the IDE?!\r\n\r\nI also tried reproducing by changing `parent/pom.xml`, the `maven-surefire-plugin` configuration to include `-Dfile.encoding=ISO-8859-1`. I then ran `mvn test -Dtest=XmlUtilTest -Dfile.encoding=ISO-8859-1`. I confirmed that `Charset.defaultCharset()` writes out `ISO-8859-1`, but the tests still passed even without the change in this PR.\r\n\r\n---\r\nEven though I can't reproduce, I think it's worth including the fix. Looking at the code, it's clearly wrong to not specify the character encoding.","created_at":"2017-04-25T19:28:52Z","updated_at":"2017-04-28T11:01:52Z","closed_at":"2017-04-28T11:01:52Z","merged_at":"2017-04-28T11:01:52Z","merge_commit_sha":"f338dce6cf22d31f7abf4900a0093d7ab938b143","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/652/commits","review_comments_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/652/comments","review_comment_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/issues/652/comments","statuses_url":"https://api.github.com/repos/apache/brooklyn-server/statuses/f338dce6cf22d31f7abf4900a0093d7ab938b143","head":{"label":"aledsage:BROOKLYN-489","ref":"BROOKLYN-489","sha":"f338dce6cf22d31f7abf4900a0093d7ab938b143","user":{"login":"aledsage","id":593113,"avatar_url":"https://avatars1.githubusercontent.com/u/593113?v=3","gravatar_id":"","url":"https://api.github.com/users/aledsage","html_url":"https://github.com/aledsage","followers_url":"https://api.github.com/users/aledsage/followers","following_url":"https://api.github.com/users/aledsage/following{/other_user}","gists_url":"https://api.github.com/users/aledsage/gists{/gist_id}","starred_url":"https://api.github.com/users/aledsage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledsage/subscriptions","organizations_url":"https://api.github.com/users/aledsage/orgs","repos_url":"https://api.github.com/users/aledsage/repos","events_url":"https://api.github.com/users/aledsage/events{/privacy}","received_events_url":"https://api.github.com/users/aledsage/received_events","type":"User","site_admin":false},"repo":{"id":50909018,"name":"brooklyn-server","full_name":"aledsage/brooklyn-server","owner":{"login":"aledsage","id":593113,"avatar_url":"https://avatars1.githubusercontent.com/u/593113?v=3","gravatar_id":"","url":"https://api.github.com/users/aledsage","html_url":"https://github.com/aledsage","followers_url":"https://api.github.com/users/aledsage/followers","following_url":"https://api.github.com/users/aledsage/following{/other_user}","gists_url":"https://api.github.com/users/aledsage/gists{/gist_id}","starred_url":"https://api.github.com/users/aledsage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledsage/subscriptions","organizations_url":"https://api.github.com/users/aledsage/orgs","repos_url":"https://api.github.com/users/aledsage/repos","events_url":"https://api.github.com/users/aledsage/events{/privacy}","received_events_url":"https://api.github.com/users/aledsage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aledsage/brooklyn-server","description":"Mirror of Apache Brooklyn server","fork":true,"url":"https://api.github.com/repos/aledsage/brooklyn-server","forks_url":"https://api.github.com/repos/aledsage/brooklyn-server/forks","keys_url":"https://api.github.com/repos/aledsage/brooklyn-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aledsage/brooklyn-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aledsage/brooklyn-server/teams","hooks_url":"https://api.github.com/repos/aledsage/brooklyn-server/hooks","issue_events_url":"https://api.github.com/repos/aledsage/brooklyn-server/issues/events{/number}","events_url":"https://api.github.com/repos/aledsage/brooklyn-server/events","assignees_url":"https://api.github.com/repos/aledsage/brooklyn-server/assignees{/user}","branches_url":"https://api.github.com/repos/aledsage/brooklyn-server/branches{/branch}","tags_url":"https://api.github.com/repos/aledsage/brooklyn-server/tags","blobs_url":"https://api.github.com/repos/aledsage/brooklyn-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aledsage/brooklyn-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aledsage/brooklyn-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/aledsage/brooklyn-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aledsage/brooklyn-server/statuses/{sha}","languages_url":"https://api.github.com/repos/aledsage/brooklyn-server/languages","stargazers_url":"https://api.github.com/repos/aledsage/brooklyn-server/stargazers","contributors_url":"https://api.github.com/repos/aledsage/brooklyn-server/contributors","subscribers_url":"https://api.github.com/repos/aledsage/brooklyn-server/subscribers","subscription_url":"https://api.github.com/repos/aledsage/brooklyn-server/subscription","commits_url":"https://api.github.com/repos/aledsage/brooklyn-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/aledsage/brooklyn-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/aledsage/brooklyn-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/aledsage/brooklyn-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/aledsage/brooklyn-server/contents/{+path}","compare_url":"https://api.github.com/repos/aledsage/brooklyn-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aledsage/brooklyn-server/merges","archive_url":"https://api.github.com/repos/aledsage/brooklyn-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aledsage/brooklyn-server/downloads","issues_url":"https://api.github.com/repos/aledsage/brooklyn-server/issues{/number}","pulls_url":"https://api.github.com/repos/aledsage/brooklyn-server/pulls{/number}","milestones_url":"https://api.github.com/repos/aledsage/brooklyn-server/milestones{/number}","notifications_url":"https://api.github.com/repos/aledsage/brooklyn-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aledsage/brooklyn-server/labels{/name}","releases_url":"https://api.github.com/repos/aledsage/brooklyn-server/releases{/id}","deployments_url":"https://api.github.com/repos/aledsage/brooklyn-server/deployments","created_at":"2016-02-02T09:23:44Z","updated_at":"2016-02-02T09:23:52Z","pushed_at":"2017-04-27T21:57:37Z","git_url":"git://github.com/aledsage/brooklyn-server.git","ssh_url":"git@github.com:aledsage/brooklyn-server.git","clone_url":"https://github.com/aledsage/brooklyn-server.git","svn_url":"https://github.com/aledsage/brooklyn-server","homepage":null,"size":34568,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"accdf944c10c4a82a14caf048ff7f8961a9bcc99","user":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":47246081,"name":"brooklyn-server","full_name":"apache/brooklyn-server","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/brooklyn-server","description":"Mirror of Apache Brooklyn server","fork":false,"url":"https://api.github.com/repos/apache/brooklyn-server","forks_url":"https://api.github.com/repos/apache/brooklyn-server/forks","keys_url":"https://api.github.com/repos/apache/brooklyn-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/brooklyn-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/brooklyn-server/teams","hooks_url":"https://api.github.com/repos/apache/brooklyn-server/hooks","issue_events_url":"https://api.github.com/repos/apache/brooklyn-server/issues/events{/number}","events_url":"https://api.github.com/repos/apache/brooklyn-server/events","assignees_url":"https://api.github.com/repos/apache/brooklyn-server/assignees{/user}","branches_url":"https://api.github.com/repos/apache/brooklyn-server/branches{/branch}","tags_url":"https://api.github.com/repos/apache/brooklyn-server/tags","blobs_url":"https://api.github.com/repos/apache/brooklyn-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/brooklyn-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/brooklyn-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/brooklyn-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/brooklyn-server/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/brooklyn-server/languages","stargazers_url":"https://api.github.com/repos/apache/brooklyn-server/stargazers","contributors_url":"https://api.github.com/repos/apache/brooklyn-server/contributors","subscribers_url":"https://api.github.com/repos/apache/brooklyn-server/subscribers","subscription_url":"https://api.github.com/repos/apache/brooklyn-server/subscription","commits_url":"https://api.github.com/repos/apache/brooklyn-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/brooklyn-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/brooklyn-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/brooklyn-server/contents/{+path}","compare_url":"https://api.github.com/repos/apache/brooklyn-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/brooklyn-server/merges","archive_url":"https://api.github.com/repos/apache/brooklyn-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/brooklyn-server/downloads","issues_url":"https://api.github.com/repos/apache/brooklyn-server/issues{/number}","pulls_url":"https://api.github.com/repos/apache/brooklyn-server/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/brooklyn-server/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/brooklyn-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/brooklyn-server/labels{/name}","releases_url":"https://api.github.com/repos/apache/brooklyn-server/releases{/id}","deployments_url":"https://api.github.com/repos/apache/brooklyn-server/deployments","created_at":"2015-12-02T08:00:06Z","updated_at":"2017-03-30T16:04:01Z","pushed_at":"2017-04-28T11:01:51Z","git_url":"git://github.com/apache/brooklyn-server.git","ssh_url":"git@github.com:apache/brooklyn-server.git","clone_url":"https://github.com/apache/brooklyn-server.git","svn_url":"https://github.com/apache/brooklyn-server","homepage":null,"size":34668,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":"git://git.apache.org/brooklyn-server.git","open_issues_count":16,"forks":44,"open_issues":16,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/652"},"html":{"href":"https://github.com/apache/brooklyn-server/pull/652"},"issue":{"href":"https://api.github.com/repos/apache/brooklyn-server/issues/652"},"comments":{"href":"https://api.github.com/repos/apache/brooklyn-server/issues/652/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/652/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/652/commits"},"statuses":{"href":"https://api.github.com/repos/apache/brooklyn-server/statuses/f338dce6cf22d31f7abf4900a0093d7ab938b143"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"asfgit","id":1341245,"avatar_url":"https://avatars2.githubusercontent.com/u/1341245?v=3","gravatar_id":"","url":"https://api.github.com/users/asfgit","html_url":"https://github.com/asfgit","followers_url":"https://api.github.com/users/asfgit/followers","following_url":"https://api.github.com/users/asfgit/following{/other_user}","gists_url":"https://api.github.com/users/asfgit/gists{/gist_id}","starred_url":"https://api.github.com/users/asfgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asfgit/subscriptions","organizations_url":"https://api.github.com/users/asfgit/orgs","repos_url":"https://api.github.com/users/asfgit/repos","events_url":"https://api.github.com/users/asfgit/events{/privacy}","received_events_url":"https://api.github.com/users/asfgit/received_events","type":"User","site_admin":false},"comments":0,"review_comments":2,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"asfgit"}}