{"action":"created","comment":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/85558697","pull_request_review_id":6265700,"id":85558697,"diff_hunk":"@@ -0,0 +1,18 @@\n+package uk.ac.ebi.quickgo.rest;\n+\n+/**\n+ * Should be used when a value falls beyond the limits of a given range.\n+ *\n+ * @author Ricardo Antunes\n+ */\n+public class RangeOutOfBoundsException extends RuntimeException {\n+    static final String RANGE_ERROR_MSG = \"Provided value: %d, goes beyond the defined boundary: [%d, %d]\";\n+\n+    public RangeOutOfBoundsException(String message) {\n+        super(message);\n+    }\n+\n+    public RangeOutOfBoundsException(int lowerLimit, int upperLimit, int value) {\n+        super(String.format(RANGE_ERROR_MSG, value, lowerLimit, upperLimit));\n+    }\n+}","path":"rest-common/src/main/java/uk/ac/ebi/quickgo/rest/RangeOutOfBoundsException.java","position":18,"original_position":18,"commit_id":"fe8aa8841b8d9de159c2e6f012546cf84cc4c678","original_commit_id":"fe8aa8841b8d9de159c2e6f012546cf84cc4c678","user":{"login":"TonyWardell","id":8235630,"avatar_url":"https://avatars.githubusercontent.com/u/8235630?v=3","gravatar_id":"","url":"https://api.github.com/users/TonyWardell","html_url":"https://github.com/TonyWardell","followers_url":"https://api.github.com/users/TonyWardell/followers","following_url":"https://api.github.com/users/TonyWardell/following{/other_user}","gists_url":"https://api.github.com/users/TonyWardell/gists{/gist_id}","starred_url":"https://api.github.com/users/TonyWardell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TonyWardell/subscriptions","organizations_url":"https://api.github.com/users/TonyWardell/orgs","repos_url":"https://api.github.com/users/TonyWardell/repos","events_url":"https://api.github.com/users/TonyWardell/events{/privacy}","received_events_url":"https://api.github.com/users/TonyWardell/received_events","type":"User","site_admin":false},"body":"OK I'm going to be picky here ;)\r\nStrictly speaking you don't have a range out of bounds exception as your range is what is valid and the index value is out of bounds. I suggest extending IndexOutOfBoundsException as this is really what it is.\r\nAlso I like creating parameter objects like Range replaceing upper and lower limit - you can even then subclass it as PageRange with the validation on that method, and create an exception that is context appropriate but all encapsulated and reusable. ","created_at":"2016-10-28T15:53:57Z","updated_at":"2016-10-28T16:00:07Z","html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/99#discussion_r85558697","pull_request_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/85558697"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/99#discussion_r85558697"},"pull_request":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99","id":91159138,"html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/99","diff_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/99.diff","patch_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/99.patch","issue_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/99","number":99,"state":"open","locked":false,"title":"GOA-2179_replace_illegalargmentexception_with_parameterexception_where_necessary","user":{"login":"rantunesboreas","id":15346245,"avatar_url":"https://avatars.githubusercontent.com/u/15346245?v=3","gravatar_id":"","url":"https://api.github.com/users/rantunesboreas","html_url":"https://github.com/rantunesboreas","followers_url":"https://api.github.com/users/rantunesboreas/followers","following_url":"https://api.github.com/users/rantunesboreas/following{/other_user}","gists_url":"https://api.github.com/users/rantunesboreas/gists{/gist_id}","starred_url":"https://api.github.com/users/rantunesboreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantunesboreas/subscriptions","organizations_url":"https://api.github.com/users/rantunesboreas/orgs","repos_url":"https://api.github.com/users/rantunesboreas/repos","events_url":"https://api.github.com/users/rantunesboreas/events{/privacy}","received_events_url":"https://api.github.com/users/rantunesboreas/received_events","type":"User","site_admin":false},"body":"Merge branch 'master' into GOA-2179_replace_illegalargmentexception_with_parameterexception_where_necessary\n\n# Conflicts:\n#\tgeneproduct-rest/src/main/java/uk/ac/ebi/quickgo/geneproduct/controller/GeneProductController.java","created_at":"2016-10-27T09:01:08Z","updated_at":"2016-10-28T16:00:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5005bd9ec09c7c473bcd930fcc5ab6db35b88f9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99/commits","review_comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99/comments","review_comment_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/99/comments","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/fe8aa8841b8d9de159c2e6f012546cf84cc4c678","head":{"label":"ebi-uniprot:GOA-2179_replace_illegalargmentexception_with_parameterexception_where_necessary","ref":"GOA-2179_replace_illegalargmentexception_with_parameterexception_where_necessary","sha":"fe8aa8841b8d9de159c2e6f012546cf84cc4c678","user":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"repo":{"id":55400531,"name":"QuickGOBE","full_name":"ebi-uniprot/QuickGOBE","owner":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ebi-uniprot/QuickGOBE","description":"Repository containing the back-end logic for QuickGO","fork":false,"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE","forks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/forks","keys_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/teams","hooks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/hooks","issue_events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/events{/number}","events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/events","assignees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/assignees{/user}","branches_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/branches{/branch}","tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/tags","blobs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/refs{/sha}","trees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/{sha}","languages_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/languages","stargazers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/stargazers","contributors_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contributors","subscribers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscribers","subscription_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscription","commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/commits{/sha}","git_commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/commits{/sha}","comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/comments{/number}","issue_comment_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/comments{/number}","contents_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contents/{+path}","compare_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/merges","archive_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/downloads","issues_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues{/number}","pulls_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls{/number}","milestones_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/milestones{/number}","notifications_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/labels{/name}","releases_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/releases{/id}","deployments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/deployments","created_at":"2016-04-04T09:51:06Z","updated_at":"2016-04-15T17:33:42Z","pushed_at":"2016-10-28T15:17:03Z","git_url":"git://github.com/ebi-uniprot/QuickGOBE.git","ssh_url":"git@github.com:ebi-uniprot/QuickGOBE.git","clone_url":"https://github.com/ebi-uniprot/QuickGOBE.git","svn_url":"https://github.com/ebi-uniprot/QuickGOBE","homepage":null,"size":11026,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"ebi-uniprot:master","ref":"master","sha":"378c198f96dbdafa74135d33164def43a6116f6f","user":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"repo":{"id":55400531,"name":"QuickGOBE","full_name":"ebi-uniprot/QuickGOBE","owner":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ebi-uniprot/QuickGOBE","description":"Repository containing the back-end logic for QuickGO","fork":false,"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE","forks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/forks","keys_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/teams","hooks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/hooks","issue_events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/events{/number}","events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/events","assignees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/assignees{/user}","branches_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/branches{/branch}","tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/tags","blobs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/refs{/sha}","trees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/{sha}","languages_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/languages","stargazers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/stargazers","contributors_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contributors","subscribers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscribers","subscription_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscription","commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/commits{/sha}","git_commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/commits{/sha}","comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/comments{/number}","issue_comment_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/comments{/number}","contents_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contents/{+path}","compare_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/merges","archive_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/downloads","issues_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues{/number}","pulls_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls{/number}","milestones_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/milestones{/number}","notifications_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/labels{/name}","releases_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/releases{/id}","deployments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/deployments","created_at":"2016-04-04T09:51:06Z","updated_at":"2016-04-15T17:33:42Z","pushed_at":"2016-10-28T15:17:03Z","git_url":"git://github.com/ebi-uniprot/QuickGOBE.git","ssh_url":"git@github.com:ebi-uniprot/QuickGOBE.git","clone_url":"https://github.com/ebi-uniprot/QuickGOBE.git","svn_url":"https://github.com/ebi-uniprot/QuickGOBE","homepage":null,"size":11026,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/99"},"issue":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/99"},"comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/fe8aa8841b8d9de159c2e6f012546cf84cc4c678"}}}}
{"actor":{"display_login":"TonyWardell"}}