{"action":"created","comment":{"url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/comments/55962804","id":55962804,"diff_hunk":"@@ -0,0 +1,86 @@\n+/*\n+ * Copyright (c) 2010-2016 the original author or authors\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining\n+ * a copy of this software and associated documentation files (the\n+ * \"Software\"), to deal in the Software without restriction, including\n+ * without limitation the rights to use, copy, modify, merge, publish,\n+ * distribute, sublicense, and/or sell copies of the Software, and to\n+ * permit persons to whom the Software is furnished to do so, subject to\n+ * the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be\n+ * included in all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n+ */\n+\n+package org.jmxtrans.agent.properties;\n+\n+import org.jmxtrans.agent.util.Preconditions2;\n+import org.jmxtrans.agent.util.io.IoRuntimeException;\n+import org.jmxtrans.agent.util.io.Resource;\n+import org.jmxtrans.agent.util.io.ResourceFactory;\n+\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.util.HashMap;\n+import java.util.Map;\n+import java.util.Properties;\n+\n+import javax.annotation.Nonnull;\n+\n+/**\n+ * {@link PropertiesLoader} based on a {@link Resource}.\n+ *\n+ * @author <a href=\"mailto:cleclerc@cloudbees.com\">Cyrille Le Clerc</a>\n+ * @author Kristoffer Erlandsson\n+ */\n+public class PropertiesLoaderImpl implements PropertiesLoader {\n+\n+    private final Resource resources;\n+\n+    public PropertiesLoaderImpl(@Nonnull Resource resources) {","path":"src/main/java/org/jmxtrans/agent/properties/PropertiesLoaderImpl.java","position":49,"original_position":49,"commit_id":"5f882a9e98c6ae0018018115d657ac42f9a06dc3","original_commit_id":"5f882a9e98c6ae0018018115d657ac42f9a06dc3","user":{"login":"kerlandsson","id":4170345,"avatar_url":"https://avatars.githubusercontent.com/u/4170345?v=3","gravatar_id":"","url":"https://api.github.com/users/kerlandsson","html_url":"https://github.com/kerlandsson","followers_url":"https://api.github.com/users/kerlandsson/followers","following_url":"https://api.github.com/users/kerlandsson/following{/other_user}","gists_url":"https://api.github.com/users/kerlandsson/gists{/gist_id}","starred_url":"https://api.github.com/users/kerlandsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerlandsson/subscriptions","organizations_url":"https://api.github.com/users/kerlandsson/orgs","repos_url":"https://api.github.com/users/kerlandsson/repos","events_url":"https://api.github.com/users/kerlandsson/events{/privacy}","received_events_url":"https://api.github.com/users/kerlandsson/received_events","type":"User","site_admin":false},"body":"Why resouce**s**? Isn't it a single resource?","created_at":"2016-03-14T07:27:35Z","updated_at":"2016-03-14T07:27:35Z","html_url":"https://github.com/jmxtrans/jmxtrans-agent/pull/72#discussion_r55962804","pull_request_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/comments/55962804"},"html":{"href":"https://github.com/jmxtrans/jmxtrans-agent/pull/72#discussion_r55962804"},"pull_request":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72","id":62640841,"html_url":"https://github.com/jmxtrans/jmxtrans-agent/pull/72","diff_url":"https://github.com/jmxtrans/jmxtrans-agent/pull/72.diff","patch_url":"https://github.com/jmxtrans/jmxtrans-agent/pull/72.patch","issue_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/72","number":72,"state":"open","locked":false,"title":"Replace UrlOrFilePropertiesLoader by a PropertiesLoader based on the IO Resource Framework","user":{"login":"cyrille-leclerc","id":459691,"avatar_url":"https://avatars.githubusercontent.com/u/459691?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrille-leclerc","html_url":"https://github.com/cyrille-leclerc","followers_url":"https://api.github.com/users/cyrille-leclerc/followers","following_url":"https://api.github.com/users/cyrille-leclerc/following{/other_user}","gists_url":"https://api.github.com/users/cyrille-leclerc/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrille-leclerc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrille-leclerc/subscriptions","organizations_url":"https://api.github.com/users/cyrille-leclerc/orgs","repos_url":"https://api.github.com/users/cyrille-leclerc/repos","events_url":"https://api.github.com/users/cyrille-leclerc/events{/privacy}","received_events_url":"https://api.github.com/users/cyrille-leclerc/received_events","type":"User","site_admin":false},"body":"* Replace UrlOrFilePropertiesLoader by a PropertiesLoader based on our new IO Resource Framework\r\n* Add log messages\r\n* Use properties loader in the test src/test/tomcat","created_at":"2016-03-12T13:01:58Z","updated_at":"2016-03-14T07:27:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65deef39f833ca264e6631a6073939517439a055","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72/commits","review_comments_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72/comments","review_comment_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/72/comments","statuses_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/statuses/5f882a9e98c6ae0018018115d657ac42f9a06dc3","head":{"label":"cyrille-leclerc:use-io-resource-framework-in-properties-loader","ref":"use-io-resource-framework-in-properties-loader","sha":"5f882a9e98c6ae0018018115d657ac42f9a06dc3","user":{"login":"cyrille-leclerc","id":459691,"avatar_url":"https://avatars.githubusercontent.com/u/459691?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrille-leclerc","html_url":"https://github.com/cyrille-leclerc","followers_url":"https://api.github.com/users/cyrille-leclerc/followers","following_url":"https://api.github.com/users/cyrille-leclerc/following{/other_user}","gists_url":"https://api.github.com/users/cyrille-leclerc/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrille-leclerc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrille-leclerc/subscriptions","organizations_url":"https://api.github.com/users/cyrille-leclerc/orgs","repos_url":"https://api.github.com/users/cyrille-leclerc/repos","events_url":"https://api.github.com/users/cyrille-leclerc/events{/privacy}","received_events_url":"https://api.github.com/users/cyrille-leclerc/received_events","type":"User","site_admin":false},"repo":{"id":10181877,"name":"jmxtrans-agent","full_name":"cyrille-leclerc/jmxtrans-agent","owner":{"login":"cyrille-leclerc","id":459691,"avatar_url":"https://avatars.githubusercontent.com/u/459691?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrille-leclerc","html_url":"https://github.com/cyrille-leclerc","followers_url":"https://api.github.com/users/cyrille-leclerc/followers","following_url":"https://api.github.com/users/cyrille-leclerc/following{/other_user}","gists_url":"https://api.github.com/users/cyrille-leclerc/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrille-leclerc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrille-leclerc/subscriptions","organizations_url":"https://api.github.com/users/cyrille-leclerc/orgs","repos_url":"https://api.github.com/users/cyrille-leclerc/repos","events_url":"https://api.github.com/users/cyrille-leclerc/events{/privacy}","received_events_url":"https://api.github.com/users/cyrille-leclerc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cyrille-leclerc/jmxtrans-agent","description":"Java Agent based JMX metrics exporter.","fork":true,"url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent","forks_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/forks","keys_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/teams","hooks_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/hooks","issue_events_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/issues/events{/number}","events_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/events","assignees_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/assignees{/user}","branches_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/branches{/branch}","tags_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/tags","blobs_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/languages","stargazers_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/stargazers","contributors_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/contributors","subscribers_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/subscribers","subscription_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/subscription","commits_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/contents/{+path}","compare_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/merges","archive_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/downloads","issues_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/issues{/number}","pulls_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/labels{/name}","releases_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/releases{/id}","deployments_url":"https://api.github.com/repos/cyrille-leclerc/jmxtrans-agent/deployments","created_at":"2013-05-20T21:01:03Z","updated_at":"2016-01-06T14:30:13Z","pushed_at":"2016-03-12T13:00:50Z","git_url":"git://github.com/cyrille-leclerc/jmxtrans-agent.git","ssh_url":"git@github.com:cyrille-leclerc/jmxtrans-agent.git","clone_url":"https://github.com/cyrille-leclerc/jmxtrans-agent.git","svn_url":"https://github.com/cyrille-leclerc/jmxtrans-agent","homepage":null,"size":689,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jmxtrans:master","ref":"master","sha":"db1096d222e42d204aaf87871c5f6acbe57e83dd","user":{"login":"jmxtrans","id":3198433,"avatar_url":"https://avatars.githubusercontent.com/u/3198433?v=3","gravatar_id":"","url":"https://api.github.com/users/jmxtrans","html_url":"https://github.com/jmxtrans","followers_url":"https://api.github.com/users/jmxtrans/followers","following_url":"https://api.github.com/users/jmxtrans/following{/other_user}","gists_url":"https://api.github.com/users/jmxtrans/gists{/gist_id}","starred_url":"https://api.github.com/users/jmxtrans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmxtrans/subscriptions","organizations_url":"https://api.github.com/users/jmxtrans/orgs","repos_url":"https://api.github.com/users/jmxtrans/repos","events_url":"https://api.github.com/users/jmxtrans/events{/privacy}","received_events_url":"https://api.github.com/users/jmxtrans/received_events","type":"Organization","site_admin":false},"repo":{"id":9603892,"name":"jmxtrans-agent","full_name":"jmxtrans/jmxtrans-agent","owner":{"login":"jmxtrans","id":3198433,"avatar_url":"https://avatars.githubusercontent.com/u/3198433?v=3","gravatar_id":"","url":"https://api.github.com/users/jmxtrans","html_url":"https://github.com/jmxtrans","followers_url":"https://api.github.com/users/jmxtrans/followers","following_url":"https://api.github.com/users/jmxtrans/following{/other_user}","gists_url":"https://api.github.com/users/jmxtrans/gists{/gist_id}","starred_url":"https://api.github.com/users/jmxtrans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmxtrans/subscriptions","organizations_url":"https://api.github.com/users/jmxtrans/orgs","repos_url":"https://api.github.com/users/jmxtrans/repos","events_url":"https://api.github.com/users/jmxtrans/events{/privacy}","received_events_url":"https://api.github.com/users/jmxtrans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jmxtrans/jmxtrans-agent","description":"Java Agent based JMX metrics exporter.","fork":false,"url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent","forks_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/forks","keys_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/teams","hooks_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/hooks","issue_events_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/events{/number}","events_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/events","assignees_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/assignees{/user}","branches_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/branches{/branch}","tags_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/tags","blobs_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/languages","stargazers_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/stargazers","contributors_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/contributors","subscribers_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/subscribers","subscription_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/subscription","commits_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/contents/{+path}","compare_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/merges","archive_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/downloads","issues_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues{/number}","pulls_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/labels{/name}","releases_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/releases{/id}","deployments_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/deployments","created_at":"2013-04-22T16:49:49Z","updated_at":"2016-03-11T22:05:29Z","pushed_at":"2016-03-12T13:02:49Z","git_url":"git://github.com/jmxtrans/jmxtrans-agent.git","ssh_url":"git@github.com:jmxtrans/jmxtrans-agent.git","clone_url":"https://github.com/jmxtrans/jmxtrans-agent.git","svn_url":"https://github.com/jmxtrans/jmxtrans-agent","homepage":null,"size":821,"stargazers_count":51,"watchers_count":51,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":37,"mirror_url":null,"open_issues_count":15,"forks":37,"open_issues":15,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72"},"html":{"href":"https://github.com/jmxtrans/jmxtrans-agent/pull/72"},"issue":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/72"},"comments":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/statuses/5f882a9e98c6ae0018018115d657ac42f9a06dc3"}}}}