{"action":"created","comment":{"url":"https://api.github.com/repos/strongbox/strongbox/pulls/comments/170420931","pull_request_review_id":99112238,"id":170420931,"diff_hunk":"@@ -0,0 +1,32 @@\n+package org.carlspring.strongbox.services;\n+\n+import java.io.IOException;\n+import java.nio.file.Files;\n+import java.nio.file.Path;\n+import java.nio.file.attribute.BasicFileAttributes;\n+import java.text.SimpleDateFormat;\n+import java.util.Date;\n+import org.apache.commons.io.FileUtils;\n+import org.carlspring.strongbox.domain.FileContent;\n+import org.springframework.stereotype.Component;\n+\n+@Component\n+public class FileContentFetcher\n+{\n+    public FileContent fetchFileContent(Path path) throws IOException\n+    {\n+        BasicFileAttributes attributes = Files.readAttributes(path, BasicFileAttributes.class);\n+\n+        FileContent fileContent = new FileContent();\n+        fileContent.setName(path.getFileName().toString());","path":"strongbox-web-core/src/main/java/org/carlspring/strongbox/services/FileContentFetcher.java","position":21,"original_position":21,"commit_id":"1ea57d13b3fcd54c8e22276b86090fc39d545e40","original_commit_id":"1ea57d13b3fcd54c8e22276b86090fc39d545e40","user":{"login":"cs-devops-bot","id":20419677,"avatar_url":"https://avatars3.githubusercontent.com/u/20419677?v=4","gravatar_id":"","url":"https://api.github.com/users/cs-devops-bot","html_url":"https://github.com/cs-devops-bot","followers_url":"https://api.github.com/users/cs-devops-bot/followers","following_url":"https://api.github.com/users/cs-devops-bot/following{/other_user}","gists_url":"https://api.github.com/users/cs-devops-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/cs-devops-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cs-devops-bot/subscriptions","organizations_url":"https://api.github.com/users/cs-devops-bot/orgs","repos_url":"https://api.github.com/users/cs-devops-bot/repos","events_url":"https://api.github.com/users/cs-devops-bot/events{/privacy}","received_events_url":"https://api.github.com/users/cs-devops-bot/received_events","type":"User","site_admin":false},"body":"![INFO](https://sonarsource.github.io/sonar-github/severity-info.png 'Severity: INFO') Possible null pointer dereference in org.carlspring.strongbox.services.FileContentFetcher.fetchFileContent(Path) due to return value of called method [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://dev.carlspring.org/sonar/coding_rules#rule_key=findbugs%3ANP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE)\n","created_at":"2018-02-24T13:10:04Z","updated_at":"2018-02-24T13:10:04Z","html_url":"https://github.com/strongbox/strongbox/pull/583#discussion_r170420931","pull_request_url":"https://api.github.com/repos/strongbox/strongbox/pulls/583","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/strongbox/strongbox/pulls/comments/170420931"},"html":{"href":"https://github.com/strongbox/strongbox/pull/583#discussion_r170420931"},"pull_request":{"href":"https://api.github.com/repos/strongbox/strongbox/pulls/583"}}},"pull_request":{"url":"https://api.github.com/repos/strongbox/strongbox/pulls/583","id":167438521,"html_url":"https://github.com/strongbox/strongbox/pull/583","diff_url":"https://github.com/strongbox/strongbox/pull/583.diff","patch_url":"https://github.com/strongbox/strongbox/pull/583.patch","issue_url":"https://api.github.com/repos/strongbox/strongbox/issues/583","number":583,"state":"open","locked":false,"title":"Implemented browsing in BrowseController under /browse","user":{"login":"sanket407","id":10473520,"avatar_url":"https://avatars3.githubusercontent.com/u/10473520?v=4","gravatar_id":"","url":"https://api.github.com/users/sanket407","html_url":"https://github.com/sanket407","followers_url":"https://api.github.com/users/sanket407/followers","following_url":"https://api.github.com/users/sanket407/following{/other_user}","gists_url":"https://api.github.com/users/sanket407/gists{/gist_id}","starred_url":"https://api.github.com/users/sanket407/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanket407/subscriptions","organizations_url":"https://api.github.com/users/sanket407/orgs","repos_url":"https://api.github.com/users/sanket407/repos","events_url":"https://api.github.com/users/sanket407/events{/privacy}","received_events_url":"https://api.github.com/users/sanket407/received_events","type":"User","site_admin":false},"body":"Implemented browsing under /browse.\r\nAll folders are redirected to /browse again from browsing.\r\nAll files are redirected to /storages for download.\r\nNote: File/Artifact download not supported for Nuget currently as NugetArtifactController does not support direct file download currently.\r\nTest this with accept-text/html","created_at":"2018-02-06T15:04:02Z","updated_at":"2018-02-24T13:10:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53a70804fd8307006c733c42ba4b1718cbecb783","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/strongbox/strongbox/pulls/583/commits","review_comments_url":"https://api.github.com/repos/strongbox/strongbox/pulls/583/comments","review_comment_url":"https://api.github.com/repos/strongbox/strongbox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongbox/strongbox/issues/583/comments","statuses_url":"https://api.github.com/repos/strongbox/strongbox/statuses/1ea57d13b3fcd54c8e22276b86090fc39d545e40","head":{"label":"sanket407:browse_new","ref":"browse_new","sha":"1ea57d13b3fcd54c8e22276b86090fc39d545e40","user":{"login":"sanket407","id":10473520,"avatar_url":"https://avatars3.githubusercontent.com/u/10473520?v=4","gravatar_id":"","url":"https://api.github.com/users/sanket407","html_url":"https://github.com/sanket407","followers_url":"https://api.github.com/users/sanket407/followers","following_url":"https://api.github.com/users/sanket407/following{/other_user}","gists_url":"https://api.github.com/users/sanket407/gists{/gist_id}","starred_url":"https://api.github.com/users/sanket407/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanket407/subscriptions","organizations_url":"https://api.github.com/users/sanket407/orgs","repos_url":"https://api.github.com/users/sanket407/repos","events_url":"https://api.github.com/users/sanket407/events{/privacy}","received_events_url":"https://api.github.com/users/sanket407/received_events","type":"User","site_admin":false},"repo":{"id":113540589,"name":"strongbox","full_name":"sanket407/strongbox","owner":{"login":"sanket407","id":10473520,"avatar_url":"https://avatars3.githubusercontent.com/u/10473520?v=4","gravatar_id":"","url":"https://api.github.com/users/sanket407","html_url":"https://github.com/sanket407","followers_url":"https://api.github.com/users/sanket407/followers","following_url":"https://api.github.com/users/sanket407/following{/other_user}","gists_url":"https://api.github.com/users/sanket407/gists{/gist_id}","starred_url":"https://api.github.com/users/sanket407/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanket407/subscriptions","organizations_url":"https://api.github.com/users/sanket407/orgs","repos_url":"https://api.github.com/users/sanket407/repos","events_url":"https://api.github.com/users/sanket407/events{/privacy}","received_events_url":"https://api.github.com/users/sanket407/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanket407/strongbox","description":"Strongbox is an artifact repository manager.","fork":true,"url":"https://api.github.com/repos/sanket407/strongbox","forks_url":"https://api.github.com/repos/sanket407/strongbox/forks","keys_url":"https://api.github.com/repos/sanket407/strongbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanket407/strongbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanket407/strongbox/teams","hooks_url":"https://api.github.com/repos/sanket407/strongbox/hooks","issue_events_url":"https://api.github.com/repos/sanket407/strongbox/issues/events{/number}","events_url":"https://api.github.com/repos/sanket407/strongbox/events","assignees_url":"https://api.github.com/repos/sanket407/strongbox/assignees{/user}","branches_url":"https://api.github.com/repos/sanket407/strongbox/branches{/branch}","tags_url":"https://api.github.com/repos/sanket407/strongbox/tags","blobs_url":"https://api.github.com/repos/sanket407/strongbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanket407/strongbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanket407/strongbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanket407/strongbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanket407/strongbox/statuses/{sha}","languages_url":"https://api.github.com/repos/sanket407/strongbox/languages","stargazers_url":"https://api.github.com/repos/sanket407/strongbox/stargazers","contributors_url":"https://api.github.com/repos/sanket407/strongbox/contributors","subscribers_url":"https://api.github.com/repos/sanket407/strongbox/subscribers","subscription_url":"https://api.github.com/repos/sanket407/strongbox/subscription","commits_url":"https://api.github.com/repos/sanket407/strongbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanket407/strongbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanket407/strongbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanket407/strongbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanket407/strongbox/contents/{+path}","compare_url":"https://api.github.com/repos/sanket407/strongbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanket407/strongbox/merges","archive_url":"https://api.github.com/repos/sanket407/strongbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanket407/strongbox/downloads","issues_url":"https://api.github.com/repos/sanket407/strongbox/issues{/number}","pulls_url":"https://api.github.com/repos/sanket407/strongbox/pulls{/number}","milestones_url":"https://api.github.com/repos/sanket407/strongbox/milestones{/number}","notifications_url":"https://api.github.com/repos/sanket407/strongbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanket407/strongbox/labels{/name}","releases_url":"https://api.github.com/repos/sanket407/strongbox/releases{/id}","deployments_url":"https://api.github.com/repos/sanket407/strongbox/deployments","created_at":"2017-12-08T06:34:46Z","updated_at":"2017-12-08T06:34:49Z","pushed_at":"2018-02-24T13:03:14Z","git_url":"git://github.com/sanket407/strongbox.git","ssh_url":"git@github.com:sanket407/strongbox.git","clone_url":"https://github.com/sanket407/strongbox.git","svn_url":"https://github.com/sanket407/strongbox","homepage":"","size":7836,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"strongbox:master","ref":"master","sha":"2d6b8a742ec4451333f456f7d961fda1c253753a","user":{"login":"strongbox","id":5637881,"avatar_url":"https://avatars0.githubusercontent.com/u/5637881?v=4","gravatar_id":"","url":"https://api.github.com/users/strongbox","html_url":"https://github.com/strongbox","followers_url":"https://api.github.com/users/strongbox/followers","following_url":"https://api.github.com/users/strongbox/following{/other_user}","gists_url":"https://api.github.com/users/strongbox/gists{/gist_id}","starred_url":"https://api.github.com/users/strongbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongbox/subscriptions","organizations_url":"https://api.github.com/users/strongbox/orgs","repos_url":"https://api.github.com/users/strongbox/repos","events_url":"https://api.github.com/users/strongbox/events{/privacy}","received_events_url":"https://api.github.com/users/strongbox/received_events","type":"Organization","site_admin":false},"repo":{"id":11830269,"name":"strongbox","full_name":"strongbox/strongbox","owner":{"login":"strongbox","id":5637881,"avatar_url":"https://avatars0.githubusercontent.com/u/5637881?v=4","gravatar_id":"","url":"https://api.github.com/users/strongbox","html_url":"https://github.com/strongbox","followers_url":"https://api.github.com/users/strongbox/followers","following_url":"https://api.github.com/users/strongbox/following{/other_user}","gists_url":"https://api.github.com/users/strongbox/gists{/gist_id}","starred_url":"https://api.github.com/users/strongbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongbox/subscriptions","organizations_url":"https://api.github.com/users/strongbox/orgs","repos_url":"https://api.github.com/users/strongbox/repos","events_url":"https://api.github.com/users/strongbox/events{/privacy}","received_events_url":"https://api.github.com/users/strongbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongbox/strongbox","description":"Strongbox is an artifact repository manager.","fork":false,"url":"https://api.github.com/repos/strongbox/strongbox","forks_url":"https://api.github.com/repos/strongbox/strongbox/forks","keys_url":"https://api.github.com/repos/strongbox/strongbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongbox/strongbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongbox/strongbox/teams","hooks_url":"https://api.github.com/repos/strongbox/strongbox/hooks","issue_events_url":"https://api.github.com/repos/strongbox/strongbox/issues/events{/number}","events_url":"https://api.github.com/repos/strongbox/strongbox/events","assignees_url":"https://api.github.com/repos/strongbox/strongbox/assignees{/user}","branches_url":"https://api.github.com/repos/strongbox/strongbox/branches{/branch}","tags_url":"https://api.github.com/repos/strongbox/strongbox/tags","blobs_url":"https://api.github.com/repos/strongbox/strongbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongbox/strongbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongbox/strongbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongbox/strongbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongbox/strongbox/statuses/{sha}","languages_url":"https://api.github.com/repos/strongbox/strongbox/languages","stargazers_url":"https://api.github.com/repos/strongbox/strongbox/stargazers","contributors_url":"https://api.github.com/repos/strongbox/strongbox/contributors","subscribers_url":"https://api.github.com/repos/strongbox/strongbox/subscribers","subscription_url":"https://api.github.com/repos/strongbox/strongbox/subscription","commits_url":"https://api.github.com/repos/strongbox/strongbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongbox/strongbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongbox/strongbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongbox/strongbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongbox/strongbox/contents/{+path}","compare_url":"https://api.github.com/repos/strongbox/strongbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongbox/strongbox/merges","archive_url":"https://api.github.com/repos/strongbox/strongbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongbox/strongbox/downloads","issues_url":"https://api.github.com/repos/strongbox/strongbox/issues{/number}","pulls_url":"https://api.github.com/repos/strongbox/strongbox/pulls{/number}","milestones_url":"https://api.github.com/repos/strongbox/strongbox/milestones{/number}","notifications_url":"https://api.github.com/repos/strongbox/strongbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongbox/strongbox/labels{/name}","releases_url":"https://api.github.com/repos/strongbox/strongbox/releases{/id}","deployments_url":"https://api.github.com/repos/strongbox/strongbox/deployments","created_at":"2013-08-01T23:27:37Z","updated_at":"2018-02-24T05:43:35Z","pushed_at":"2018-02-24T13:03:16Z","git_url":"git://github.com/strongbox/strongbox.git","ssh_url":"git@github.com:strongbox/strongbox.git","clone_url":"https://github.com/strongbox/strongbox.git","svn_url":"https://github.com/strongbox/strongbox","homepage":"","size":7840,"stargazers_count":28,"watchers_count":28,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":46,"open_issues":52,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongbox/strongbox/pulls/583"},"html":{"href":"https://github.com/strongbox/strongbox/pull/583"},"issue":{"href":"https://api.github.com/repos/strongbox/strongbox/issues/583"},"comments":{"href":"https://api.github.com/repos/strongbox/strongbox/issues/583/comments"},"review_comments":{"href":"https://api.github.com/repos/strongbox/strongbox/pulls/583/comments"},"review_comment":{"href":"https://api.github.com/repos/strongbox/strongbox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongbox/strongbox/pulls/583/commits"},"statuses":{"href":"https://api.github.com/repos/strongbox/strongbox/statuses/1ea57d13b3fcd54c8e22276b86090fc39d545e40"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cs-devops-bot"}}