{"action":"created","comment":{"url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/comments/74090456","id":74090456,"diff_hunk":"@@ -0,0 +1,215 @@\n+package com.moodysalem.phantomjs.wrapper;\n+\n+import java.io.File;\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.nio.file.Files;\n+import java.nio.file.Path;\n+import java.nio.file.Paths;\n+import java.security.MessageDigest;\n+import java.security.NoSuchAlgorithmException;\n+import java.util.logging.Level;\n+import java.util.logging.Logger;\n+import java.util.zip.ZipEntry;\n+import java.util.zip.ZipInputStream;\n+\n+import com.moodysalem.phantomjs.wrapper.beans.OperatingSystem;\n+\n+public final class PhantomJSSetup{\n+\n+\tprotected final static Logger logger = Logger.getLogger(PhantomJSSetup.class.getName());\n+\n+\t// this will store a reference to the executable phantomjs binary after we unzip the resource\n+\tprotected static File PHANTOM_JS_BINARY = null;","path":"src/main/java/com/moodysalem/phantomjs/wrapper/PhantomJSSetup.java","position":23,"original_position":23,"commit_id":"43fdc03133680976f5de6dfc5415fe29a4e8c160","original_commit_id":"43fdc03133680976f5de6dfc5415fe29a4e8c160","user":{"login":"GuillaumeC91","id":11822651,"avatar_url":"https://avatars.githubusercontent.com/u/11822651?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeC91","html_url":"https://github.com/GuillaumeC91","followers_url":"https://api.github.com/users/GuillaumeC91/followers","following_url":"https://api.github.com/users/GuillaumeC91/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeC91/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeC91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeC91/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeC91/orgs","repos_url":"https://api.github.com/users/GuillaumeC91/repos","events_url":"https://api.github.com/users/GuillaumeC91/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeC91/received_events","type":"User","site_admin":false},"body":"@moodysalem Gotcha. I've made the whole class final, but maybe being able to support re-initialization is something we need. As for the `PHANTOM_JS_BINARY` being final, we would have to initialize it by making a `private function` call correct? Something like so:\r\n\r\n`protected static File PHANTOM_JS_BINARY = initialize();`","created_at":"2016-08-09T16:11:41Z","updated_at":"2016-08-09T16:11:41Z","html_url":"https://github.com/moodysalem/java-phantomjs-wrapper/pull/1#discussion_r74090456","pull_request_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/comments/74090456"},"html":{"href":"https://github.com/moodysalem/java-phantomjs-wrapper/pull/1#discussion_r74090456"},"pull_request":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1","id":80356535,"html_url":"https://github.com/moodysalem/java-phantomjs-wrapper/pull/1","diff_url":"https://github.com/moodysalem/java-phantomjs-wrapper/pull/1.diff","patch_url":"https://github.com/moodysalem/java-phantomjs-wrapper/pull/1.patch","issue_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/issues/1","number":1,"state":"open","locked":false,"title":"Version 2.1.0 Class Maintenance and Performance Enhancements","user":{"login":"GuillaumeC91","id":11822651,"avatar_url":"https://avatars.githubusercontent.com/u/11822651?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeC91","html_url":"https://github.com/GuillaumeC91","followers_url":"https://api.github.com/users/GuillaumeC91/followers","following_url":"https://api.github.com/users/GuillaumeC91/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeC91/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeC91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeC91/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeC91/orgs","repos_url":"https://api.github.com/users/GuillaumeC91/repos","events_url":"https://api.github.com/users/GuillaumeC91/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeC91/received_events","type":"User","site_admin":false},"body":"Implemented PhantomJSConstants class, and performance enhancements. Setup now checks existence of binaries before extraction, and runs using a single executable instead of a transaction based extraction. Multi-threadness is handled via OS using single executable. Packages have also been created for class segmentation and maintenance.\r\n\r\nAdditional load test has been added to `TestPhantomJS.class` to test multiple executable invocations using a single binary file.","created_at":"2016-08-07T02:43:37Z","updated_at":"2016-08-09T16:11:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e34dca0693b2a30041a2ca516d7b5fc80b2e7dbf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1/commits","review_comments_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1/comments","review_comment_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/issues/1/comments","statuses_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/statuses/43fdc03133680976f5de6dfc5415fe29a4e8c160","head":{"label":"GuillaumeC91:master","ref":"master","sha":"43fdc03133680976f5de6dfc5415fe29a4e8c160","user":{"login":"GuillaumeC91","id":11822651,"avatar_url":"https://avatars.githubusercontent.com/u/11822651?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeC91","html_url":"https://github.com/GuillaumeC91","followers_url":"https://api.github.com/users/GuillaumeC91/followers","following_url":"https://api.github.com/users/GuillaumeC91/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeC91/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeC91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeC91/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeC91/orgs","repos_url":"https://api.github.com/users/GuillaumeC91/repos","events_url":"https://api.github.com/users/GuillaumeC91/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeC91/received_events","type":"User","site_admin":false},"repo":{"id":65111010,"name":"java-phantomjs-wrapper","full_name":"GuillaumeC91/java-phantomjs-wrapper","owner":{"login":"GuillaumeC91","id":11822651,"avatar_url":"https://avatars.githubusercontent.com/u/11822651?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeC91","html_url":"https://github.com/GuillaumeC91","followers_url":"https://api.github.com/users/GuillaumeC91/followers","following_url":"https://api.github.com/users/GuillaumeC91/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeC91/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeC91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeC91/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeC91/orgs","repos_url":"https://api.github.com/users/GuillaumeC91/repos","events_url":"https://api.github.com/users/GuillaumeC91/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeC91/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GuillaumeC91/java-phantomjs-wrapper","description":"A Java wrapper around the PhantomJS binaries deployed to Maven Central Repository","fork":true,"url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper","forks_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/forks","keys_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/teams","hooks_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/hooks","issue_events_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/issues/events{/number}","events_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/events","assignees_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/assignees{/user}","branches_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/branches{/branch}","tags_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/tags","blobs_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/statuses/{sha}","languages_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/languages","stargazers_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/stargazers","contributors_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/contributors","subscribers_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/subscribers","subscription_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/subscription","commits_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/contents/{+path}","compare_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/merges","archive_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/downloads","issues_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/issues{/number}","pulls_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/pulls{/number}","milestones_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/milestones{/number}","notifications_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/labels{/name}","releases_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/releases{/id}","deployments_url":"https://api.github.com/repos/GuillaumeC91/java-phantomjs-wrapper/deployments","created_at":"2016-08-07T02:09:16Z","updated_at":"2016-08-07T02:09:18Z","pushed_at":"2016-08-09T02:47:39Z","git_url":"git://github.com/GuillaumeC91/java-phantomjs-wrapper.git","ssh_url":"git@github.com:GuillaumeC91/java-phantomjs-wrapper.git","clone_url":"https://github.com/GuillaumeC91/java-phantomjs-wrapper.git","svn_url":"https://github.com/GuillaumeC91/java-phantomjs-wrapper","homepage":"","size":59997,"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":"moodysalem:master","ref":"master","sha":"178478515e972c4d84424438ac20601e27a6076b","user":{"login":"moodysalem","id":7897876,"avatar_url":"https://avatars.githubusercontent.com/u/7897876?v=3","gravatar_id":"","url":"https://api.github.com/users/moodysalem","html_url":"https://github.com/moodysalem","followers_url":"https://api.github.com/users/moodysalem/followers","following_url":"https://api.github.com/users/moodysalem/following{/other_user}","gists_url":"https://api.github.com/users/moodysalem/gists{/gist_id}","starred_url":"https://api.github.com/users/moodysalem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moodysalem/subscriptions","organizations_url":"https://api.github.com/users/moodysalem/orgs","repos_url":"https://api.github.com/users/moodysalem/repos","events_url":"https://api.github.com/users/moodysalem/events{/privacy}","received_events_url":"https://api.github.com/users/moodysalem/received_events","type":"User","site_admin":false},"repo":{"id":52992502,"name":"java-phantomjs-wrapper","full_name":"moodysalem/java-phantomjs-wrapper","owner":{"login":"moodysalem","id":7897876,"avatar_url":"https://avatars.githubusercontent.com/u/7897876?v=3","gravatar_id":"","url":"https://api.github.com/users/moodysalem","html_url":"https://github.com/moodysalem","followers_url":"https://api.github.com/users/moodysalem/followers","following_url":"https://api.github.com/users/moodysalem/following{/other_user}","gists_url":"https://api.github.com/users/moodysalem/gists{/gist_id}","starred_url":"https://api.github.com/users/moodysalem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moodysalem/subscriptions","organizations_url":"https://api.github.com/users/moodysalem/orgs","repos_url":"https://api.github.com/users/moodysalem/repos","events_url":"https://api.github.com/users/moodysalem/events{/privacy}","received_events_url":"https://api.github.com/users/moodysalem/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moodysalem/java-phantomjs-wrapper","description":"A Java wrapper around the PhantomJS binaries deployed to Maven Central Repository","fork":false,"url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper","forks_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/forks","keys_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/teams","hooks_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/hooks","issue_events_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/issues/events{/number}","events_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/events","assignees_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/assignees{/user}","branches_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/branches{/branch}","tags_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/tags","blobs_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/statuses/{sha}","languages_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/languages","stargazers_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/stargazers","contributors_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/contributors","subscribers_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/subscribers","subscription_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/subscription","commits_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/contents/{+path}","compare_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/merges","archive_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/downloads","issues_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/issues{/number}","pulls_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls{/number}","milestones_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/milestones{/number}","notifications_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/labels{/name}","releases_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/releases{/id}","deployments_url":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/deployments","created_at":"2016-03-02T20:03:49Z","updated_at":"2016-07-15T12:24:40Z","pushed_at":"2016-08-09T02:47:40Z","git_url":"git://github.com/moodysalem/java-phantomjs-wrapper.git","ssh_url":"git@github.com:moodysalem/java-phantomjs-wrapper.git","clone_url":"https://github.com/moodysalem/java-phantomjs-wrapper.git","svn_url":"https://github.com/moodysalem/java-phantomjs-wrapper","homepage":"","size":59979,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1"},"html":{"href":"https://github.com/moodysalem/java-phantomjs-wrapper/pull/1"},"issue":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/issues/1"},"comments":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/moodysalem/java-phantomjs-wrapper/statuses/43fdc03133680976f5de6dfc5415fe29a4e8c160"}}}}
{"actor":{"display_login":"GuillaumeC91"}}