{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments/56513690","id":56513690,"diff_hunk":"@@ -36,7 +37,7 @@ public static Object getInstance(Class c, CoreConfig moduleName) {\n         List<String> modules = Configuration.getInstance().getListProperty(moduleName);\n         if (modules.isEmpty())\n             return null;\n-        if (!modules.isEmpty() && modules.size() != 1) {\n+        if (modules.size() != 1) {","path":"blueflood-core/src/main/java/com/rackspacecloud/blueflood/utils/ModuleLoader.java","position":13,"original_position":13,"commit_id":"f4bfaf9f466aaadbbe7126e699a1e2671bcfc13f","original_commit_id":"f4bfaf9f466aaadbbe7126e699a1e2671bcfc13f","user":{"login":"ChandraAddala","id":1525859,"avatar_url":"https://avatars.githubusercontent.com/u/1525859?v=3","gravatar_id":"","url":"https://api.github.com/users/ChandraAddala","html_url":"https://github.com/ChandraAddala","followers_url":"https://api.github.com/users/ChandraAddala/followers","following_url":"https://api.github.com/users/ChandraAddala/following{/other_user}","gists_url":"https://api.github.com/users/ChandraAddala/gists{/gist_id}","starred_url":"https://api.github.com/users/ChandraAddala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChandraAddala/subscriptions","organizations_url":"https://api.github.com/users/ChandraAddala/orgs","repos_url":"https://api.github.com/users/ChandraAddala/repos","events_url":"https://api.github.com/users/ChandraAddala/events{/privacy}","received_events_url":"https://api.github.com/users/ChandraAddala/received_events","type":"User","site_admin":false},"body":"Good refactoring.","created_at":"2016-03-17T14:35:54Z","updated_at":"2016-03-17T14:35:54Z","html_url":"https://github.com/rackerlabs/blueflood/pull/648#discussion_r56513690","pull_request_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments/56513690"},"html":{"href":"https://github.com/rackerlabs/blueflood/pull/648#discussion_r56513690"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648","id":63144937,"html_url":"https://github.com/rackerlabs/blueflood/pull/648","diff_url":"https://github.com/rackerlabs/blueflood/pull/648.diff","patch_url":"https://github.com/rackerlabs/blueflood/pull/648.patch","issue_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/648","number":648,"state":"open","locked":false,"title":"Test module loader","user":{"login":"izrik","id":1711679,"avatar_url":"https://avatars.githubusercontent.com/u/1711679?v=3","gravatar_id":"","url":"https://api.github.com/users/izrik","html_url":"https://github.com/izrik","followers_url":"https://api.github.com/users/izrik/followers","following_url":"https://api.github.com/users/izrik/following{/other_user}","gists_url":"https://api.github.com/users/izrik/gists{/gist_id}","starred_url":"https://api.github.com/users/izrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izrik/subscriptions","organizations_url":"https://api.github.com/users/izrik/orgs","repos_url":"https://api.github.com/users/izrik/repos","events_url":"https://api.github.com/users/izrik/events{/privacy}","received_events_url":"https://api.github.com/users/izrik/received_events","type":"User","site_admin":false},"body":"This PR adds tests for the `ModuleLoader` class, in the `blueflood-core` module. There are already tests for it in the `blueflood-http` module, but since that's different than the module that the class is defined in, coverage is being reported as 0% (see [here](https://coveralls.io/builds/5442321/source?filename=blueflood-core%2Fsrc%2Fmain%2Fjava%2Fcom%2Frackspacecloud%2Fblueflood%2Futils%2FModuleLoader.java)). Also, these tests better demonstrate the behavior of the class, and provide pertinent negative test cases.\r\n\r\nAccording to JaCoCo, the test class, by itself, provides coverage for `ModuleLoader` to the tune of:\r\n* 75% for instructions \r\n* 100% for branches\r\n* 78% for lines\r\nWhat's not tested is exception handling and the default parameter-less constructor.\r\n\r\nOn the whole, `ModuleLoader` appears to be a thin, confusing, and broken wrapper around `ClassLoader.loadClass(String)`. I believe it should be refactored away.","created_at":"2016-03-16T22:15:51Z","updated_at":"2016-03-17T14:35:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15862f17a07ed425898e2e55b7c4e5ec28094d0a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/648/comments","statuses_url":"https://api.github.com/repos/rackerlabs/blueflood/statuses/f4bfaf9f466aaadbbe7126e699a1e2671bcfc13f","head":{"label":"izrik:test-module-loader","ref":"test-module-loader","sha":"f4bfaf9f466aaadbbe7126e699a1e2671bcfc13f","user":{"login":"izrik","id":1711679,"avatar_url":"https://avatars.githubusercontent.com/u/1711679?v=3","gravatar_id":"","url":"https://api.github.com/users/izrik","html_url":"https://github.com/izrik","followers_url":"https://api.github.com/users/izrik/followers","following_url":"https://api.github.com/users/izrik/following{/other_user}","gists_url":"https://api.github.com/users/izrik/gists{/gist_id}","starred_url":"https://api.github.com/users/izrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izrik/subscriptions","organizations_url":"https://api.github.com/users/izrik/orgs","repos_url":"https://api.github.com/users/izrik/repos","events_url":"https://api.github.com/users/izrik/events{/privacy}","received_events_url":"https://api.github.com/users/izrik/received_events","type":"User","site_admin":false},"repo":{"id":41885166,"name":"blueflood","full_name":"izrik/blueflood","owner":{"login":"izrik","id":1711679,"avatar_url":"https://avatars.githubusercontent.com/u/1711679?v=3","gravatar_id":"","url":"https://api.github.com/users/izrik","html_url":"https://github.com/izrik","followers_url":"https://api.github.com/users/izrik/followers","following_url":"https://api.github.com/users/izrik/following{/other_user}","gists_url":"https://api.github.com/users/izrik/gists{/gist_id}","starred_url":"https://api.github.com/users/izrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izrik/subscriptions","organizations_url":"https://api.github.com/users/izrik/orgs","repos_url":"https://api.github.com/users/izrik/repos","events_url":"https://api.github.com/users/izrik/events{/privacy}","received_events_url":"https://api.github.com/users/izrik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/izrik/blueflood","description":"A distributed system designed to ingest and process time series data","fork":true,"url":"https://api.github.com/repos/izrik/blueflood","forks_url":"https://api.github.com/repos/izrik/blueflood/forks","keys_url":"https://api.github.com/repos/izrik/blueflood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/izrik/blueflood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/izrik/blueflood/teams","hooks_url":"https://api.github.com/repos/izrik/blueflood/hooks","issue_events_url":"https://api.github.com/repos/izrik/blueflood/issues/events{/number}","events_url":"https://api.github.com/repos/izrik/blueflood/events","assignees_url":"https://api.github.com/repos/izrik/blueflood/assignees{/user}","branches_url":"https://api.github.com/repos/izrik/blueflood/branches{/branch}","tags_url":"https://api.github.com/repos/izrik/blueflood/tags","blobs_url":"https://api.github.com/repos/izrik/blueflood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/izrik/blueflood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/izrik/blueflood/git/refs{/sha}","trees_url":"https://api.github.com/repos/izrik/blueflood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/izrik/blueflood/statuses/{sha}","languages_url":"https://api.github.com/repos/izrik/blueflood/languages","stargazers_url":"https://api.github.com/repos/izrik/blueflood/stargazers","contributors_url":"https://api.github.com/repos/izrik/blueflood/contributors","subscribers_url":"https://api.github.com/repos/izrik/blueflood/subscribers","subscription_url":"https://api.github.com/repos/izrik/blueflood/subscription","commits_url":"https://api.github.com/repos/izrik/blueflood/commits{/sha}","git_commits_url":"https://api.github.com/repos/izrik/blueflood/git/commits{/sha}","comments_url":"https://api.github.com/repos/izrik/blueflood/comments{/number}","issue_comment_url":"https://api.github.com/repos/izrik/blueflood/issues/comments{/number}","contents_url":"https://api.github.com/repos/izrik/blueflood/contents/{+path}","compare_url":"https://api.github.com/repos/izrik/blueflood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/izrik/blueflood/merges","archive_url":"https://api.github.com/repos/izrik/blueflood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/izrik/blueflood/downloads","issues_url":"https://api.github.com/repos/izrik/blueflood/issues{/number}","pulls_url":"https://api.github.com/repos/izrik/blueflood/pulls{/number}","milestones_url":"https://api.github.com/repos/izrik/blueflood/milestones{/number}","notifications_url":"https://api.github.com/repos/izrik/blueflood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/izrik/blueflood/labels{/name}","releases_url":"https://api.github.com/repos/izrik/blueflood/releases{/id}","deployments_url":"https://api.github.com/repos/izrik/blueflood/deployments","created_at":"2015-09-03T21:40:07Z","updated_at":"2016-01-11T17:45:10Z","pushed_at":"2016-03-16T21:54:00Z","git_url":"git://github.com/izrik/blueflood.git","ssh_url":"git@github.com:izrik/blueflood.git","clone_url":"https://github.com/izrik/blueflood.git","svn_url":"https://github.com/izrik/blueflood","homepage":"http://www.blueflood.io","size":8284,"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":"rackerlabs:master","ref":"master","sha":"f24a8ba3990dd38e26e29da1d3ec234285c478f1","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10081109,"name":"blueflood","full_name":"rackerlabs/blueflood","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/blueflood","description":"A distributed system designed to ingest and process time series data","fork":false,"url":"https://api.github.com/repos/rackerlabs/blueflood","forks_url":"https://api.github.com/repos/rackerlabs/blueflood/forks","keys_url":"https://api.github.com/repos/rackerlabs/blueflood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/blueflood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/blueflood/teams","hooks_url":"https://api.github.com/repos/rackerlabs/blueflood/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/blueflood/events","assignees_url":"https://api.github.com/repos/rackerlabs/blueflood/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/blueflood/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/blueflood/tags","blobs_url":"https://api.github.com/repos/rackerlabs/blueflood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/blueflood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/blueflood/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/blueflood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/blueflood/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/blueflood/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/blueflood/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/blueflood/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/blueflood/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/blueflood/subscription","commits_url":"https://api.github.com/repos/rackerlabs/blueflood/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/blueflood/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/blueflood/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/blueflood/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/blueflood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/blueflood/merges","archive_url":"https://api.github.com/repos/rackerlabs/blueflood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/blueflood/downloads","issues_url":"https://api.github.com/repos/rackerlabs/blueflood/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/blueflood/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/blueflood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/blueflood/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/blueflood/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/blueflood/deployments","created_at":"2013-05-15T14:50:39Z","updated_at":"2016-03-16T08:26:29Z","pushed_at":"2016-03-16T22:15:52Z","git_url":"git://github.com/rackerlabs/blueflood.git","ssh_url":"git@github.com:rackerlabs/blueflood.git","clone_url":"https://github.com/rackerlabs/blueflood.git","svn_url":"https://github.com/rackerlabs/blueflood","homepage":"http://www.blueflood.io","size":12426,"stargazers_count":417,"watchers_count":417,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":58,"mirror_url":null,"open_issues_count":27,"forks":58,"open_issues":27,"watchers":417,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648"},"html":{"href":"https://github.com/rackerlabs/blueflood/pull/648"},"issue":{"href":"https://api.github.com/repos/rackerlabs/blueflood/issues/648"},"comments":{"href":"https://api.github.com/repos/rackerlabs/blueflood/issues/648/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/648/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/blueflood/statuses/f4bfaf9f466aaadbbe7126e699a1e2671bcfc13f"}}}}