{"action":"created","comment":{"url":"https://api.github.com/repos/weld/core/pulls/comments/55574960","id":55574960,"diff_hunk":"@@ -0,0 +1,60 @@\n+/*\n+ * JBoss, Home of Professional Open Source\n+ * Copyright 2016, Red Hat, Inc. and/or its affiliates, and individual\n+ * contributors by the @authors tag. See the copyright.txt in the\n+ * distribution for a full listing of individual contributors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.jboss.weld.environment.se.contexts.activator;\n+\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+import javax.annotation.Priority;\n+import javax.inject.Inject;\n+import javax.interceptor.AroundInvoke;\n+import javax.interceptor.Interceptor;\n+import javax.interceptor.InvocationContext;\n+\n+import org.jboss.weld.context.bound.BoundRequestContext;\n+\n+@Interceptor\n+@RequestScopeActive\n+@SuppressWarnings(\"checkstyle:magicnumber\")\n+@Priority(Interceptor.Priority.LIBRARY_BEFORE + 100)\n+public class RequestScopeActiveInterceptor {\n+\n+    @Inject\n+    BoundRequestContext boundRequestContext;\n+\n+    @AroundInvoke\n+    Object invoke(InvocationContext invocationContext) throws Exception {\n+\n+        if (!boundRequestContext.isActive()) {\n+            Map<String, Object> storage = new HashMap<>();\n+            try {\n+                boundRequestContext.associate(storage);\n+                boundRequestContext.activate();\n+            } finally {\n+                final Object obj = invocationContext.proceed();\n+                if (boundRequestContext != null) {","path":"environments/se/core/src/main/java/org/jboss/weld/environment/se/contexts/activator/RequestScopeActiveInterceptor.java","position":49,"original_position":49,"commit_id":"15571a07794f735c7059cba1576c97c962f95291","original_commit_id":"15571a07794f735c7059cba1576c97c962f95291","user":{"login":"mkouba","id":913004,"avatar_url":"https://avatars.githubusercontent.com/u/913004?v=3","gravatar_id":"","url":"https://api.github.com/users/mkouba","html_url":"https://github.com/mkouba","followers_url":"https://api.github.com/users/mkouba/followers","following_url":"https://api.github.com/users/mkouba/following{/other_user}","gists_url":"https://api.github.com/users/mkouba/gists{/gist_id}","starred_url":"https://api.github.com/users/mkouba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkouba/subscriptions","organizations_url":"https://api.github.com/users/mkouba/orgs","repos_url":"https://api.github.com/users/mkouba/repos","events_url":"https://api.github.com/users/mkouba/events{/privacy}","received_events_url":"https://api.github.com/users/mkouba/received_events","type":"User","site_admin":false},"body":"`boundRequestContext` cannot be `null` in this place...","created_at":"2016-03-09T19:33:45Z","updated_at":"2016-03-09T19:33:45Z","html_url":"https://github.com/weld/core/pull/1297#discussion_r55574960","pull_request_url":"https://api.github.com/repos/weld/core/pulls/1297","_links":{"self":{"href":"https://api.github.com/repos/weld/core/pulls/comments/55574960"},"html":{"href":"https://github.com/weld/core/pull/1297#discussion_r55574960"},"pull_request":{"href":"https://api.github.com/repos/weld/core/pulls/1297"}}},"pull_request":{"url":"https://api.github.com/repos/weld/core/pulls/1297","id":62225459,"html_url":"https://github.com/weld/core/pull/1297","diff_url":"https://github.com/weld/core/pull/1297.diff","patch_url":"https://github.com/weld/core/pull/1297.patch","issue_url":"https://api.github.com/repos/weld/core/issues/1297","number":1297,"state":"open","locked":false,"title":"WELD-2117 introduce @RequestScopedActive interceptor to activate requ…","user":{"login":"tremes","id":924640,"avatar_url":"https://avatars.githubusercontent.com/u/924640?v=3","gravatar_id":"","url":"https://api.github.com/users/tremes","html_url":"https://github.com/tremes","followers_url":"https://api.github.com/users/tremes/followers","following_url":"https://api.github.com/users/tremes/following{/other_user}","gists_url":"https://api.github.com/users/tremes/gists{/gist_id}","starred_url":"https://api.github.com/users/tremes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tremes/subscriptions","organizations_url":"https://api.github.com/users/tremes/orgs","repos_url":"https://api.github.com/users/tremes/repos","events_url":"https://api.github.com/users/tremes/events{/privacy}","received_events_url":"https://api.github.com/users/tremes/received_events","type":"User","site_admin":false},"body":"…estContext in SE.","created_at":"2016-03-09T13:06:31Z","updated_at":"2016-03-09T19:33:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5147ce994f99ce8b04e48adf16ebf8f17b6804ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/weld/core/pulls/1297/commits","review_comments_url":"https://api.github.com/repos/weld/core/pulls/1297/comments","review_comment_url":"https://api.github.com/repos/weld/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weld/core/issues/1297/comments","statuses_url":"https://api.github.com/repos/weld/core/statuses/15571a07794f735c7059cba1576c97c962f95291","head":{"label":"tremes:WELD-2117","ref":"WELD-2117","sha":"15571a07794f735c7059cba1576c97c962f95291","user":{"login":"tremes","id":924640,"avatar_url":"https://avatars.githubusercontent.com/u/924640?v=3","gravatar_id":"","url":"https://api.github.com/users/tremes","html_url":"https://github.com/tremes","followers_url":"https://api.github.com/users/tremes/followers","following_url":"https://api.github.com/users/tremes/following{/other_user}","gists_url":"https://api.github.com/users/tremes/gists{/gist_id}","starred_url":"https://api.github.com/users/tremes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tremes/subscriptions","organizations_url":"https://api.github.com/users/tremes/orgs","repos_url":"https://api.github.com/users/tremes/repos","events_url":"https://api.github.com/users/tremes/events{/privacy}","received_events_url":"https://api.github.com/users/tremes/received_events","type":"User","site_admin":false},"repo":{"id":4212527,"name":"core","full_name":"tremes/core","owner":{"login":"tremes","id":924640,"avatar_url":"https://avatars.githubusercontent.com/u/924640?v=3","gravatar_id":"","url":"https://api.github.com/users/tremes","html_url":"https://github.com/tremes","followers_url":"https://api.github.com/users/tremes/followers","following_url":"https://api.github.com/users/tremes/following{/other_user}","gists_url":"https://api.github.com/users/tremes/gists{/gist_id}","starred_url":"https://api.github.com/users/tremes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tremes/subscriptions","organizations_url":"https://api.github.com/users/tremes/orgs","repos_url":"https://api.github.com/users/tremes/repos","events_url":"https://api.github.com/users/tremes/events{/privacy}","received_events_url":"https://api.github.com/users/tremes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tremes/core","description":"Weld, including integrations for Servlet containers and Java SE, examples and documentation","fork":true,"url":"https://api.github.com/repos/tremes/core","forks_url":"https://api.github.com/repos/tremes/core/forks","keys_url":"https://api.github.com/repos/tremes/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tremes/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tremes/core/teams","hooks_url":"https://api.github.com/repos/tremes/core/hooks","issue_events_url":"https://api.github.com/repos/tremes/core/issues/events{/number}","events_url":"https://api.github.com/repos/tremes/core/events","assignees_url":"https://api.github.com/repos/tremes/core/assignees{/user}","branches_url":"https://api.github.com/repos/tremes/core/branches{/branch}","tags_url":"https://api.github.com/repos/tremes/core/tags","blobs_url":"https://api.github.com/repos/tremes/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tremes/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tremes/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/tremes/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tremes/core/statuses/{sha}","languages_url":"https://api.github.com/repos/tremes/core/languages","stargazers_url":"https://api.github.com/repos/tremes/core/stargazers","contributors_url":"https://api.github.com/repos/tremes/core/contributors","subscribers_url":"https://api.github.com/repos/tremes/core/subscribers","subscription_url":"https://api.github.com/repos/tremes/core/subscription","commits_url":"https://api.github.com/repos/tremes/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/tremes/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/tremes/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/tremes/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/tremes/core/contents/{+path}","compare_url":"https://api.github.com/repos/tremes/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tremes/core/merges","archive_url":"https://api.github.com/repos/tremes/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tremes/core/downloads","issues_url":"https://api.github.com/repos/tremes/core/issues{/number}","pulls_url":"https://api.github.com/repos/tremes/core/pulls{/number}","milestones_url":"https://api.github.com/repos/tremes/core/milestones{/number}","notifications_url":"https://api.github.com/repos/tremes/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tremes/core/labels{/name}","releases_url":"https://api.github.com/repos/tremes/core/releases{/id}","deployments_url":"https://api.github.com/repos/tremes/core/deployments","created_at":"2012-05-03T09:39:05Z","updated_at":"2014-08-26T07:34:46Z","pushed_at":"2016-03-09T14:15:46Z","git_url":"git://github.com/tremes/core.git","ssh_url":"git@github.com:tremes/core.git","clone_url":"https://github.com/tremes/core.git","svn_url":"https://github.com/tremes/core","homepage":"http://www.seamframework.org/Weld","size":43577,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"weld:master","ref":"master","sha":"7d8bddc8fbddaedc0b0cfaa3a08ca3213fd2ba43","user":{"login":"weld","id":331033,"avatar_url":"https://avatars.githubusercontent.com/u/331033?v=3","gravatar_id":"","url":"https://api.github.com/users/weld","html_url":"https://github.com/weld","followers_url":"https://api.github.com/users/weld/followers","following_url":"https://api.github.com/users/weld/following{/other_user}","gists_url":"https://api.github.com/users/weld/gists{/gist_id}","starred_url":"https://api.github.com/users/weld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weld/subscriptions","organizations_url":"https://api.github.com/users/weld/orgs","repos_url":"https://api.github.com/users/weld/repos","events_url":"https://api.github.com/users/weld/events{/privacy}","received_events_url":"https://api.github.com/users/weld/received_events","type":"Organization","site_admin":false},"repo":{"id":819907,"name":"core","full_name":"weld/core","owner":{"login":"weld","id":331033,"avatar_url":"https://avatars.githubusercontent.com/u/331033?v=3","gravatar_id":"","url":"https://api.github.com/users/weld","html_url":"https://github.com/weld","followers_url":"https://api.github.com/users/weld/followers","following_url":"https://api.github.com/users/weld/following{/other_user}","gists_url":"https://api.github.com/users/weld/gists{/gist_id}","starred_url":"https://api.github.com/users/weld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weld/subscriptions","organizations_url":"https://api.github.com/users/weld/orgs","repos_url":"https://api.github.com/users/weld/repos","events_url":"https://api.github.com/users/weld/events{/privacy}","received_events_url":"https://api.github.com/users/weld/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weld/core","description":"Weld, including integrations for Servlet containers and Java SE, examples and documentation","fork":false,"url":"https://api.github.com/repos/weld/core","forks_url":"https://api.github.com/repos/weld/core/forks","keys_url":"https://api.github.com/repos/weld/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weld/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weld/core/teams","hooks_url":"https://api.github.com/repos/weld/core/hooks","issue_events_url":"https://api.github.com/repos/weld/core/issues/events{/number}","events_url":"https://api.github.com/repos/weld/core/events","assignees_url":"https://api.github.com/repos/weld/core/assignees{/user}","branches_url":"https://api.github.com/repos/weld/core/branches{/branch}","tags_url":"https://api.github.com/repos/weld/core/tags","blobs_url":"https://api.github.com/repos/weld/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weld/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weld/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/weld/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weld/core/statuses/{sha}","languages_url":"https://api.github.com/repos/weld/core/languages","stargazers_url":"https://api.github.com/repos/weld/core/stargazers","contributors_url":"https://api.github.com/repos/weld/core/contributors","subscribers_url":"https://api.github.com/repos/weld/core/subscribers","subscription_url":"https://api.github.com/repos/weld/core/subscription","commits_url":"https://api.github.com/repos/weld/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/weld/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/weld/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/weld/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/weld/core/contents/{+path}","compare_url":"https://api.github.com/repos/weld/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weld/core/merges","archive_url":"https://api.github.com/repos/weld/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weld/core/downloads","issues_url":"https://api.github.com/repos/weld/core/issues{/number}","pulls_url":"https://api.github.com/repos/weld/core/pulls{/number}","milestones_url":"https://api.github.com/repos/weld/core/milestones{/number}","notifications_url":"https://api.github.com/repos/weld/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weld/core/labels{/name}","releases_url":"https://api.github.com/repos/weld/core/releases{/id}","deployments_url":"https://api.github.com/repos/weld/core/deployments","created_at":"2010-08-05T19:41:31Z","updated_at":"2016-02-27T18:31:14Z","pushed_at":"2016-03-09T14:15:47Z","git_url":"git://github.com/weld/core.git","ssh_url":"git@github.com:weld/core.git","clone_url":"https://github.com/weld/core.git","svn_url":"https://github.com/weld/core","homepage":"http://weld.cdi-spec.org/","size":48902,"stargazers_count":213,"watchers_count":213,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":185,"mirror_url":null,"open_issues_count":3,"forks":185,"open_issues":3,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weld/core/pulls/1297"},"html":{"href":"https://github.com/weld/core/pull/1297"},"issue":{"href":"https://api.github.com/repos/weld/core/issues/1297"},"comments":{"href":"https://api.github.com/repos/weld/core/issues/1297/comments"},"review_comments":{"href":"https://api.github.com/repos/weld/core/pulls/1297/comments"},"review_comment":{"href":"https://api.github.com/repos/weld/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weld/core/pulls/1297/commits"},"statuses":{"href":"https://api.github.com/repos/weld/core/statuses/15571a07794f735c7059cba1576c97c962f95291"}}}}