GitHub PullRequestReviewCommentEvent at 2014-12-05 16:20:33
Repository: pippo
Actor: decebals
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/decebals/pippo/pulls/comments/21381337","id":21381337,"diff_hunk":"@@ -330,30 +336,11 @@ public ControllerInvokeListenerList getControllerInvokeListeners() {\n         return locals;\n     }\n \n-    public String urlFor(Class<? extends Controller> controllerClass, String methodName, Map<String, Object> parameters) {\n-        Route route = getRoute(controllerClass, methodName);\n-\n-        return (route != null) ? urlFor(route.getUrlPattern(), parameters) : null;\n-    }\n-\n-    public String urlFor(String urlPattern, Map<String, Object> parameters) {\n-        return getRouteMatcher().urlFor(urlPattern, parameters);\n-    }\n-\n-    private Route getRoute(Class<? extends Controller> controllerClass, String methodName) {\n-        List<Route> routes = routeMatcher.getRoutes();\n-        for (Route route : routes) {\n-            RouteHandler routeHandler = route.getRouteHandler();\n-            if (routeHandler instanceof ControllerHandler) {\n-                ControllerHandler controllerHandler = (ControllerHandler) routeHandler;\n-                if (controllerClass == controllerHandler.getControllerClass()\n-                        && methodName.equals(controllerHandler.getMethodName())) {\n-                    return route;\n-                }\n-            }\n+    public UrlBuilder getUrlBuilder() {","path":"pippo-core/src/main/java/ro/fortsoft/pippo/core/Application.java","position":81,"original_position":81,"commit_id":"8ee39f3ef74f291855458d7cdd60d85326dbafe2","original_commit_id":"8ee39f3ef74f291855458d7cdd60d85326dbafe2","user":{"login":"decebals","id":1248311,"avatar_url":"https://avatars.githubusercontent.com/u/1248311?v=3","gravatar_id":"","url":"https://api.github.com/users/decebals","html_url":"https://github.com/decebals","followers_url":"https://api.github.com/users/decebals/followers","following_url":"https://api.github.com/users/decebals/following{/other_user}","gists_url":"https://api.github.com/users/decebals/gists{/gist_id}","starred_url":"https://api.github.com/users/decebals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decebals/subscriptions","organizations_url":"https://api.github.com/users/decebals/orgs","repos_url":"https://api.github.com/users/decebals/repos","events_url":"https://api.github.com/users/decebals/events{/privacy}","received_events_url":"https://api.github.com/users/decebals/received_events","type":"User","site_admin":false},"body":"Is it necessary to make this method public? Maybe I don't see all the picture but I think that it's better to keep this method protected and to preserve `Application.urlFor(...)` that calls getUrlBuilder().urlFor().","created_at":"2014-12-05T16:20:33Z","updated_at":"2014-12-05T16:20:33Z","html_url":"https://github.com/decebals/pippo/pull/28#discussion_r21381337","pull_request_url":"https://api.github.com/repos/decebals/pippo/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/decebals/pippo/pulls/comments/21381337"},"html":{"href":"https://github.com/decebals/pippo/pull/28#discussion_r21381337"},"pull_request":{"href":"https://api.github.com/repos/decebals/pippo/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/decebals/pippo/pulls/28","id":25577680,"html_url":"https://github.com/decebals/pippo/pull/28","diff_url":"https://github.com/decebals/pippo/pull/28.diff","patch_url":"https://github.com/decebals/pippo/pull/28.patch","issue_url":"https://api.github.com/repos/decebals/pippo/issues/28","number":28,"state":"open","locked":false,"title":"Add a UrlBuilder to generate context-aware URLs","user":{"login":"gitblit","id":868217,"avatar_url":"https://avatars.githubusercontent.com/u/868217?v=3","gravatar_id":"","url":"https://api.github.com/users/gitblit","html_url":"https://github.com/gitblit","followers_url":"https://api.github.com/users/gitblit/followers","following_url":"https://api.github.com/users/gitblit/following{/other_user}","gists_url":"https://api.github.com/users/gitblit/gists{/gist_id}","starred_url":"https://api.github.com/users/gitblit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitblit/subscriptions","organizations_url":"https://api.github.com/users/gitblit/orgs","repos_url":"https://api.github.com/users/gitblit/repos","events_url":"https://api.github.com/users/gitblit/events{/privacy}","received_events_url":"https://api.github.com/users/gitblit/received_events","type":"User","site_admin":false},"body":"Also inject the `contextPath` into the templates for manual url specification.\r\n\r\nThis is step 3 towards #25.","created_at":"2014-12-05T15:25:57Z","updated_at":"2014-12-05T16:20:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc9e211a0581df5fc970f780f6ae4cf46e2bb04c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/decebals/pippo/pulls/28/commits","review_comments_url":"https://api.github.com/repos/decebals/pippo/pulls/28/comments","review_comment_url":"https://api.github.com/repos/decebals/pippo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/decebals/pippo/issues/28/comments","statuses_url":"https://api.github.com/repos/decebals/pippo/statuses/8ee39f3ef74f291855458d7cdd60d85326dbafe2","head":{"label":"decebals:urlbuilder","ref":"urlbuilder","sha":"8ee39f3ef74f291855458d7cdd60d85326dbafe2","user":{"login":"decebals","id":1248311,"avatar_url":"https://avatars.githubusercontent.com/u/1248311?v=3","gravatar_id":"","url":"https://api.github.com/users/decebals","html_url":"https://github.com/decebals","followers_url":"https://api.github.com/users/decebals/followers","following_url":"https://api.github.com/users/decebals/following{/other_user}","gists_url":"https://api.github.com/users/decebals/gists{/gist_id}","starred_url":"https://api.github.com/users/decebals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decebals/subscriptions","organizations_url":"https://api.github.com/users/decebals/orgs","repos_url":"https://api.github.com/users/decebals/repos","events_url":"https://api.github.com/users/decebals/events{/privacy}","received_events_url":"https://api.github.com/users/decebals/received_events","type":"User","site_admin":false},"repo":{"id":25979437,"name":"pippo","full_name":"decebals/pippo","owner":{"login":"decebals","id":1248311,"avatar_url":"https://avatars.githubusercontent.com/u/1248311?v=3","gravatar_id":"","url":"https://api.github.com/users/decebals","html_url":"https://github.com/decebals","followers_url":"https://api.github.com/users/decebals/followers","following_url":"https://api.github.com/users/decebals/following{/other_user}","gists_url":"https://api.github.com/users/decebals/gists{/gist_id}","starred_url":"https://api.github.com/users/decebals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decebals/subscriptions","organizations_url":"https://api.github.com/users/decebals/orgs","repos_url":"https://api.github.com/users/decebals/repos","events_url":"https://api.github.com/users/decebals/events{/privacy}","received_events_url":"https://api.github.com/users/decebals/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/decebals/pippo","description":"Micro Java Web Framework","fork":false,"url":"https://api.github.com/repos/decebals/pippo","forks_url":"https://api.github.com/repos/decebals/pippo/forks","keys_url":"https://api.github.com/repos/decebals/pippo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/decebals/pippo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/decebals/pippo/teams","hooks_url":"https://api.github.com/repos/decebals/pippo/hooks","issue_events_url":"https://api.github.com/repos/decebals/pippo/issues/events{/number}","events_url":"https://api.github.com/repos/decebals/pippo/events","assignees_url":"https://api.github.com/repos/decebals/pippo/assignees{/user}","branches_url":"https://api.github.com/repos/decebals/pippo/branches{/branch}","tags_url":"https://api.github.com/repos/decebals/pippo/tags","blobs_url":"https://api.github.com/repos/decebals/pippo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/decebals/pippo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/decebals/pippo/git/refs{/sha}","trees_url":"https://api.github.com/repos/decebals/pippo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/decebals/pippo/statuses/{sha}","languages_url":"https://api.github.com/repos/decebals/pippo/languages","stargazers_url":"https://api.github.com/repos/decebals/pippo/stargazers","contributors_url":"https://api.github.com/repos/decebals/pippo/contributors","subscribers_url":"https://api.github.com/repos/decebals/pippo/subscribers","subscription_url":"https://api.github.com/repos/decebals/pippo/subscription","commits_url":"https://api.github.com/repos/decebals/pippo/commits{/sha}","git_commits_url":"https://api.github.com/repos/decebals/pippo/git/commits{/sha}","comments_url":"https://api.github.com/repos/decebals/pippo/comments{/number}","issue_comment_url":"https://api.github.com/repos/decebals/pippo/issues/comments/{number}","contents_url":"https://api.github.com/repos/decebals/pippo/contents/{+path}","compare_url":"https://api.github.com/repos/decebals/pippo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/decebals/pippo/merges","archive_url":"https://api.github.com/repos/decebals/pippo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/decebals/pippo/downloads","issues_url":"https://api.github.com/repos/decebals/pippo/issues{/number}","pulls_url":"https://api.github.com/repos/decebals/pippo/pulls{/number}","milestones_url":"https://api.github.com/repos/decebals/pippo/milestones{/number}","notifications_url":"https://api.github.com/repos/decebals/pippo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/decebals/pippo/labels{/name}","releases_url":"https://api.github.com/repos/decebals/pippo/releases{/id}","created_at":"2014-10-30T16:23:30Z","updated_at":"2014-12-05T14:50:10Z","pushed_at":"2014-12-05T15:22:43Z","git_url":"git://github.com/decebals/pippo.git","ssh_url":"git@github.com:decebals/pippo.git","clone_url":"https://github.com/decebals/pippo.git","svn_url":"https://github.com/decebals/pippo","homepage":null,"size":991,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":11,"default_branch":"master"}},"base":{"label":"decebals:master","ref":"master","sha":"c6a0022973f27cb4a0fd3459c22ab321395b20fe","user":{"login":"decebals","id":1248311,"avatar_url":"https://avatars.githubusercontent.com/u/1248311?v=3","gravatar_id":"","url":"https://api.github.com/users/decebals","html_url":"https://github.com/decebals","followers_url":"https://api.github.com/users/decebals/followers","following_url":"https://api.github.com/users/decebals/following{/other_user}","gists_url":"https://api.github.com/users/decebals/gists{/gist_id}","starred_url":"https://api.github.com/users/decebals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decebals/subscriptions","organizations_url":"https://api.github.com/users/decebals/orgs","repos_url":"https://api.github.com/users/decebals/repos","events_url":"https://api.github.com/users/decebals/events{/privacy}","received_events_url":"https://api.github.com/users/decebals/received_events","type":"User","site_admin":false},"repo":{"id":25979437,"name":"pippo","full_name":"decebals/pippo","owner":{"login":"decebals","id":1248311,"avatar_url":"https://avatars.githubusercontent.com/u/1248311?v=3","gravatar_id":"","url":"https://api.github.com/users/decebals","html_url":"https://github.com/decebals","followers_url":"https://api.github.com/users/decebals/followers","following_url":"https://api.github.com/users/decebals/following{/other_user}","gists_url":"https://api.github.com/users/decebals/gists{/gist_id}","starred_url":"https://api.github.com/users/decebals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decebals/subscriptions","organizations_url":"https://api.github.com/users/decebals/orgs","repos_url":"https://api.github.com/users/decebals/repos","events_url":"https://api.github.com/users/decebals/events{/privacy}","received_events_url":"https://api.github.com/users/decebals/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/decebals/pippo","description":"Micro Java Web Framework","fork":false,"url":"https://api.github.com/repos/decebals/pippo","forks_url":"https://api.github.com/repos/decebals/pippo/forks","keys_url":"https://api.github.com/repos/decebals/pippo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/decebals/pippo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/decebals/pippo/teams","hooks_url":"https://api.github.com/repos/decebals/pippo/hooks","issue_events_url":"https://api.github.com/repos/decebals/pippo/issues/events{/number}","events_url":"https://api.github.com/repos/decebals/pippo/events","assignees_url":"https://api.github.com/repos/decebals/pippo/assignees{/user}","branches_url":"https://api.github.com/repos/decebals/pippo/branches{/branch}","tags_url":"https://api.github.com/repos/decebals/pippo/tags","blobs_url":"https://api.github.com/repos/decebals/pippo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/decebals/pippo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/decebals/pippo/git/refs{/sha}","trees_url":"https://api.github.com/repos/decebals/pippo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/decebals/pippo/statuses/{sha}","languages_url":"https://api.github.com/repos/decebals/pippo/languages","stargazers_url":"https://api.github.com/repos/decebals/pippo/stargazers","contributors_url":"https://api.github.com/repos/decebals/pippo/contributors","subscribers_url":"https://api.github.com/repos/decebals/pippo/subscribers","subscription_url":"https://api.github.com/repos/decebals/pippo/subscription","commits_url":"https://api.github.com/repos/decebals/pippo/commits{/sha}","git_commits_url":"https://api.github.com/repos/decebals/pippo/git/commits{/sha}","comments_url":"https://api.github.com/repos/decebals/pippo/comments{/number}","issue_comment_url":"https://api.github.com/repos/decebals/pippo/issues/comments/{number}","contents_url":"https://api.github.com/repos/decebals/pippo/contents/{+path}","compare_url":"https://api.github.com/repos/decebals/pippo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/decebals/pippo/merges","archive_url":"https://api.github.com/repos/decebals/pippo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/decebals/pippo/downloads","issues_url":"https://api.github.com/repos/decebals/pippo/issues{/number}","pulls_url":"https://api.github.com/repos/decebals/pippo/pulls{/number}","milestones_url":"https://api.github.com/repos/decebals/pippo/milestones{/number}","notifications_url":"https://api.github.com/repos/decebals/pippo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/decebals/pippo/labels{/name}","releases_url":"https://api.github.com/repos/decebals/pippo/releases{/id}","created_at":"2014-10-30T16:23:30Z","updated_at":"2014-12-05T14:50:10Z","pushed_at":"2014-12-05T15:22:43Z","git_url":"git://github.com/decebals/pippo.git","ssh_url":"git@github.com:decebals/pippo.git","clone_url":"https://github.com/decebals/pippo.git","svn_url":"https://github.com/decebals/pippo","homepage":null,"size":991,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/decebals/pippo/pulls/28"},"html":{"href":"https://github.com/decebals/pippo/pull/28"},"issue":{"href":"https://api.github.com/repos/decebals/pippo/issues/28"},"comments":{"href":"https://api.github.com/repos/decebals/pippo/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/decebals/pippo/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/decebals/pippo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/decebals/pippo/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/decebals/pippo/statuses/8ee39f3ef74f291855458d7cdd60d85326dbafe2"}}}}