{"action":"created","comment":{"url":"https://api.github.com/repos/uniqueck/feedback-system/pulls/comments/241221712","pull_request_review_id":184441294,"id":241221712,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTIyMTcxMg==","diff_hunk":"@@ -0,0 +1,99 @@\n+package com.badenia.feedback.feedbacksystem.controller;\n+\n+import java.time.LocalDateTime;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+import org.springframework.http.HttpStatus;\n+import org.springframework.stereotype.Component;\n+\n+import com.badenia.feedback.feedbacksystem.controller.ApiError.LowerCaseClassNameResolver;\n+import com.fasterxml.jackson.annotation.JsonFormat;\n+import com.fasterxml.jackson.annotation.JsonFormat.Shape;\n+import com.fasterxml.jackson.annotation.JsonTypeInfo;\n+import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;\n+import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;\n+import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase;\n+\n+import lombok.AllArgsConstructor;\n+import lombok.Data;\n+import lombok.EqualsAndHashCode;\n+\n+@Data\n+@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.CUSTOM, property = \"error\", visible = true)\n+@JsonTypeIdResolver(LowerCaseClassNameResolver.class)\n+@Component\n+class ApiError {\n+\n+\tprivate HttpStatus status;\n+\t@JsonFormat(shape = Shape.STRING, pattern = \"dd-MM-yyyy hh:mm:ss\")\n+\tprivate LocalDateTime timestamp;\n+\tprivate String message;\n+\tprivate String debugMessage;\n+\tprivate List<ApiSubError> subErrors;\n+\n+\tprivate ApiError() {\n+\t\ttimestamp = LocalDateTime.now();\n+\t}\n+\n+\tApiError(HttpStatus status) {\n+\t\tthis();\n+\t\tthis.status = status;\n+\t}\n+\n+\tApiError(HttpStatus status, Throwable cause) {\n+\t\tthis(status, \"Unexpected error\", cause);\n+\t}\n+\n+\tApiError(HttpStatus status, String message, Throwable cause) {\n+\t\tthis(status);\n+\t\tthis.message = message;\n+\t\tthis.debugMessage = cause.getLocalizedMessage();\n+\t}\n+\n+\tprivate void addSubError(ApiSubError subError) {\n+\t\tif (subErrors == null) {\n+\t\t\tsubErrors = new ArrayList<>();\n+\t\t}\n+\t\tsubErrors.add(subError);\n+\t}\n+\n+\tabstract class ApiSubError {","path":"service-rest/src/main/java/com/badenia/feedback/feedbacksystem/controller/ApiError.java","position":61,"original_position":61,"commit_id":"591bb0e0cc287c6d7cc71b6e82312fbf8920aaa4","original_commit_id":"591bb0e0cc287c6d7cc71b6e82312fbf8920aaa4","user":{"login":"sonarcloud[bot]","id":39514782,"node_id":"MDM6Qm90Mzk1MTQ3ODI=","avatar_url":"https://avatars2.githubusercontent.com/in/12526?v=4","gravatar_id":"","url":"https://api.github.com/users/sonarcloud%5Bbot%5D","html_url":"https://github.com/apps/sonarcloud","followers_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/followers","following_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/repos","events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"![Code Smell](https://sonarsource.github.io/sonar-github/code_smell.png 'Code Smell') Code Smell: Convert the abstract class \"ApiSubError\" into an interface. ([squid:S1610](https://sonarcloud.io/organizations/uniqueck-github/rules#rule_key=squid%3AS1610))\n\n[See it in SonarCloud](https://sonarcloud.io/project/issues?id=uniqueck_feedback-system&pullRequest=7&issues=AWekuGKgh73OK3Qa5o5O&open=AWekuGKgh73OK3Qa5o5O)\n\n[ISSUE_KEY]: AWekuGKgh73OK3Qa5o5O","created_at":"2018-12-12T23:20:11Z","updated_at":"2018-12-12T23:20:12Z","html_url":"https://github.com/uniqueck/feedback-system/pull/7#discussion_r241221712","pull_request_url":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/uniqueck/feedback-system/pulls/comments/241221712"},"html":{"href":"https://github.com/uniqueck/feedback-system/pull/7#discussion_r241221712"},"pull_request":{"href":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7","id":238213997,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MjEzOTk3","html_url":"https://github.com/uniqueck/feedback-system/pull/7","diff_url":"https://github.com/uniqueck/feedback-system/pull/7.diff","patch_url":"https://github.com/uniqueck/feedback-system/pull/7.patch","issue_url":"https://api.github.com/repos/uniqueck/feedback-system/issues/7","number":7,"state":"open","locked":false,"title":"Feature/add answer feature to service","user":{"login":"uniqueck","id":12494167,"node_id":"MDQ6VXNlcjEyNDk0MTY3","avatar_url":"https://avatars0.githubusercontent.com/u/12494167?v=4","gravatar_id":"","url":"https://api.github.com/users/uniqueck","html_url":"https://github.com/uniqueck","followers_url":"https://api.github.com/users/uniqueck/followers","following_url":"https://api.github.com/users/uniqueck/following{/other_user}","gists_url":"https://api.github.com/users/uniqueck/gists{/gist_id}","starred_url":"https://api.github.com/users/uniqueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uniqueck/subscriptions","organizations_url":"https://api.github.com/users/uniqueck/orgs","repos_url":"https://api.github.com/users/uniqueck/repos","events_url":"https://api.github.com/users/uniqueck/events{/privacy}","received_events_url":"https://api.github.com/users/uniqueck/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-12T23:11:35Z","updated_at":"2018-12-12T23:20:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"742a78865e45b48d9315f92da640fccbbaba756f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7/commits","review_comments_url":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7/comments","review_comment_url":"https://api.github.com/repos/uniqueck/feedback-system/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uniqueck/feedback-system/issues/7/comments","statuses_url":"https://api.github.com/repos/uniqueck/feedback-system/statuses/591bb0e0cc287c6d7cc71b6e82312fbf8920aaa4","head":{"label":"uniqueck:feature/add-answer-feature-to-service","ref":"feature/add-answer-feature-to-service","sha":"591bb0e0cc287c6d7cc71b6e82312fbf8920aaa4","user":{"login":"uniqueck","id":12494167,"node_id":"MDQ6VXNlcjEyNDk0MTY3","avatar_url":"https://avatars0.githubusercontent.com/u/12494167?v=4","gravatar_id":"","url":"https://api.github.com/users/uniqueck","html_url":"https://github.com/uniqueck","followers_url":"https://api.github.com/users/uniqueck/followers","following_url":"https://api.github.com/users/uniqueck/following{/other_user}","gists_url":"https://api.github.com/users/uniqueck/gists{/gist_id}","starred_url":"https://api.github.com/users/uniqueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uniqueck/subscriptions","organizations_url":"https://api.github.com/users/uniqueck/orgs","repos_url":"https://api.github.com/users/uniqueck/repos","events_url":"https://api.github.com/users/uniqueck/events{/privacy}","received_events_url":"https://api.github.com/users/uniqueck/received_events","type":"User","site_admin":false},"repo":{"id":156233239,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyMzMyMzk=","name":"feedback-system","full_name":"uniqueck/feedback-system","private":false,"owner":{"login":"uniqueck","id":12494167,"node_id":"MDQ6VXNlcjEyNDk0MTY3","avatar_url":"https://avatars0.githubusercontent.com/u/12494167?v=4","gravatar_id":"","url":"https://api.github.com/users/uniqueck","html_url":"https://github.com/uniqueck","followers_url":"https://api.github.com/users/uniqueck/followers","following_url":"https://api.github.com/users/uniqueck/following{/other_user}","gists_url":"https://api.github.com/users/uniqueck/gists{/gist_id}","starred_url":"https://api.github.com/users/uniqueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uniqueck/subscriptions","organizations_url":"https://api.github.com/users/uniqueck/orgs","repos_url":"https://api.github.com/users/uniqueck/repos","events_url":"https://api.github.com/users/uniqueck/events{/privacy}","received_events_url":"https://api.github.com/users/uniqueck/received_events","type":"User","site_admin":false},"html_url":"https://github.com/uniqueck/feedback-system","description":"a litte feedback system","fork":false,"url":"https://api.github.com/repos/uniqueck/feedback-system","forks_url":"https://api.github.com/repos/uniqueck/feedback-system/forks","keys_url":"https://api.github.com/repos/uniqueck/feedback-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uniqueck/feedback-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uniqueck/feedback-system/teams","hooks_url":"https://api.github.com/repos/uniqueck/feedback-system/hooks","issue_events_url":"https://api.github.com/repos/uniqueck/feedback-system/issues/events{/number}","events_url":"https://api.github.com/repos/uniqueck/feedback-system/events","assignees_url":"https://api.github.com/repos/uniqueck/feedback-system/assignees{/user}","branches_url":"https://api.github.com/repos/uniqueck/feedback-system/branches{/branch}","tags_url":"https://api.github.com/repos/uniqueck/feedback-system/tags","blobs_url":"https://api.github.com/repos/uniqueck/feedback-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uniqueck/feedback-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uniqueck/feedback-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/uniqueck/feedback-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uniqueck/feedback-system/statuses/{sha}","languages_url":"https://api.github.com/repos/uniqueck/feedback-system/languages","stargazers_url":"https://api.github.com/repos/uniqueck/feedback-system/stargazers","contributors_url":"https://api.github.com/repos/uniqueck/feedback-system/contributors","subscribers_url":"https://api.github.com/repos/uniqueck/feedback-system/subscribers","subscription_url":"https://api.github.com/repos/uniqueck/feedback-system/subscription","commits_url":"https://api.github.com/repos/uniqueck/feedback-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/uniqueck/feedback-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/uniqueck/feedback-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/uniqueck/feedback-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/uniqueck/feedback-system/contents/{+path}","compare_url":"https://api.github.com/repos/uniqueck/feedback-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uniqueck/feedback-system/merges","archive_url":"https://api.github.com/repos/uniqueck/feedback-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uniqueck/feedback-system/downloads","issues_url":"https://api.github.com/repos/uniqueck/feedback-system/issues{/number}","pulls_url":"https://api.github.com/repos/uniqueck/feedback-system/pulls{/number}","milestones_url":"https://api.github.com/repos/uniqueck/feedback-system/milestones{/number}","notifications_url":"https://api.github.com/repos/uniqueck/feedback-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uniqueck/feedback-system/labels{/name}","releases_url":"https://api.github.com/repos/uniqueck/feedback-system/releases{/id}","deployments_url":"https://api.github.com/repos/uniqueck/feedback-system/deployments","created_at":"2018-11-05T14:44:45Z","updated_at":"2018-12-12T23:12:35Z","pushed_at":"2018-12-12T23:16:45Z","git_url":"git://github.com/uniqueck/feedback-system.git","ssh_url":"git@github.com:uniqueck/feedback-system.git","clone_url":"https://github.com/uniqueck/feedback-system.git","svn_url":"https://github.com/uniqueck/feedback-system","homepage":"","size":4416,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"uniqueck:feature/thymeleaf-andrei","ref":"feature/thymeleaf-andrei","sha":"0cdbd6a2a5d39354a8b5e63a2f110198e18f7580","user":{"login":"uniqueck","id":12494167,"node_id":"MDQ6VXNlcjEyNDk0MTY3","avatar_url":"https://avatars0.githubusercontent.com/u/12494167?v=4","gravatar_id":"","url":"https://api.github.com/users/uniqueck","html_url":"https://github.com/uniqueck","followers_url":"https://api.github.com/users/uniqueck/followers","following_url":"https://api.github.com/users/uniqueck/following{/other_user}","gists_url":"https://api.github.com/users/uniqueck/gists{/gist_id}","starred_url":"https://api.github.com/users/uniqueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uniqueck/subscriptions","organizations_url":"https://api.github.com/users/uniqueck/orgs","repos_url":"https://api.github.com/users/uniqueck/repos","events_url":"https://api.github.com/users/uniqueck/events{/privacy}","received_events_url":"https://api.github.com/users/uniqueck/received_events","type":"User","site_admin":false},"repo":{"id":156233239,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyMzMyMzk=","name":"feedback-system","full_name":"uniqueck/feedback-system","private":false,"owner":{"login":"uniqueck","id":12494167,"node_id":"MDQ6VXNlcjEyNDk0MTY3","avatar_url":"https://avatars0.githubusercontent.com/u/12494167?v=4","gravatar_id":"","url":"https://api.github.com/users/uniqueck","html_url":"https://github.com/uniqueck","followers_url":"https://api.github.com/users/uniqueck/followers","following_url":"https://api.github.com/users/uniqueck/following{/other_user}","gists_url":"https://api.github.com/users/uniqueck/gists{/gist_id}","starred_url":"https://api.github.com/users/uniqueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uniqueck/subscriptions","organizations_url":"https://api.github.com/users/uniqueck/orgs","repos_url":"https://api.github.com/users/uniqueck/repos","events_url":"https://api.github.com/users/uniqueck/events{/privacy}","received_events_url":"https://api.github.com/users/uniqueck/received_events","type":"User","site_admin":false},"html_url":"https://github.com/uniqueck/feedback-system","description":"a litte feedback system","fork":false,"url":"https://api.github.com/repos/uniqueck/feedback-system","forks_url":"https://api.github.com/repos/uniqueck/feedback-system/forks","keys_url":"https://api.github.com/repos/uniqueck/feedback-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uniqueck/feedback-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uniqueck/feedback-system/teams","hooks_url":"https://api.github.com/repos/uniqueck/feedback-system/hooks","issue_events_url":"https://api.github.com/repos/uniqueck/feedback-system/issues/events{/number}","events_url":"https://api.github.com/repos/uniqueck/feedback-system/events","assignees_url":"https://api.github.com/repos/uniqueck/feedback-system/assignees{/user}","branches_url":"https://api.github.com/repos/uniqueck/feedback-system/branches{/branch}","tags_url":"https://api.github.com/repos/uniqueck/feedback-system/tags","blobs_url":"https://api.github.com/repos/uniqueck/feedback-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uniqueck/feedback-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uniqueck/feedback-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/uniqueck/feedback-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uniqueck/feedback-system/statuses/{sha}","languages_url":"https://api.github.com/repos/uniqueck/feedback-system/languages","stargazers_url":"https://api.github.com/repos/uniqueck/feedback-system/stargazers","contributors_url":"https://api.github.com/repos/uniqueck/feedback-system/contributors","subscribers_url":"https://api.github.com/repos/uniqueck/feedback-system/subscribers","subscription_url":"https://api.github.com/repos/uniqueck/feedback-system/subscription","commits_url":"https://api.github.com/repos/uniqueck/feedback-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/uniqueck/feedback-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/uniqueck/feedback-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/uniqueck/feedback-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/uniqueck/feedback-system/contents/{+path}","compare_url":"https://api.github.com/repos/uniqueck/feedback-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uniqueck/feedback-system/merges","archive_url":"https://api.github.com/repos/uniqueck/feedback-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uniqueck/feedback-system/downloads","issues_url":"https://api.github.com/repos/uniqueck/feedback-system/issues{/number}","pulls_url":"https://api.github.com/repos/uniqueck/feedback-system/pulls{/number}","milestones_url":"https://api.github.com/repos/uniqueck/feedback-system/milestones{/number}","notifications_url":"https://api.github.com/repos/uniqueck/feedback-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uniqueck/feedback-system/labels{/name}","releases_url":"https://api.github.com/repos/uniqueck/feedback-system/releases{/id}","deployments_url":"https://api.github.com/repos/uniqueck/feedback-system/deployments","created_at":"2018-11-05T14:44:45Z","updated_at":"2018-12-12T23:12:35Z","pushed_at":"2018-12-12T23:16:45Z","git_url":"git://github.com/uniqueck/feedback-system.git","ssh_url":"git@github.com:uniqueck/feedback-system.git","clone_url":"https://github.com/uniqueck/feedback-system.git","svn_url":"https://github.com/uniqueck/feedback-system","homepage":"","size":4416,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7"},"html":{"href":"https://github.com/uniqueck/feedback-system/pull/7"},"issue":{"href":"https://api.github.com/repos/uniqueck/feedback-system/issues/7"},"comments":{"href":"https://api.github.com/repos/uniqueck/feedback-system/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/uniqueck/feedback-system/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uniqueck/feedback-system/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/uniqueck/feedback-system/statuses/591bb0e0cc287c6d7cc71b6e82312fbf8920aaa4"}},"author_association":"OWNER"}}
{"actor":{"display_login":"sonarcloud"}}