{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/comments/35013294","id":35013294,"diff_hunk":"@@ -628,17 +654,28 @@ public String getMailAddressAttributeName() {\n         return StringUtils.defaultString(mailAddressAttributeName, DescriptorImpl.DEFAULT_MAILADDRESS_ATTRIBUTE_NAME);\n     }\n \n+    /**\n+     * Creates security components.\n+     * @return Created {@link SecurityComponents}\n+     * @throws Error Execution error\n+     */\n+    @Override @Nonnull\n     public SecurityComponents createSecurityComponents() {\n         Binding binding = new Binding();\n         binding.setVariable(\"instance\", this);\n \n-        BeanBuilder builder = new BeanBuilder(Jenkins.getInstance().pluginManager.uberClassLoader);\n+        final Jenkins jenkins = Jenkins.getInstance();\n+        if (jenkins == null) {\n+            throw new Error(\"Jenkins instance is not ready\");","path":"src/main/java/hudson/security/LDAPSecurityRealm.java","position":134,"original_position":134,"commit_id":"25f7fdadfd86bbe4eb6b6a7624eded1245381919","original_commit_id":"25f7fdadfd86bbe4eb6b6a7624eded1245381919","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars.githubusercontent.com/u/3000480?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"body":"Makes sense. I've used Error because there were other usages in the code below","created_at":"2015-07-20T16:22:29Z","updated_at":"2015-07-20T16:22:29Z","html_url":"https://github.com/jenkinsci/ldap-plugin/pull/4#discussion_r35013294","pull_request_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/comments/35013294"},"html":{"href":"https://github.com/jenkinsci/ldap-plugin/pull/4#discussion_r35013294"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4","id":40115726,"html_url":"https://github.com/jenkinsci/ldap-plugin/pull/4","diff_url":"https://github.com/jenkinsci/ldap-plugin/pull/4.diff","patch_url":"https://github.com/jenkinsci/ldap-plugin/pull/4.patch","issue_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/4","number":4,"state":"open","locked":false,"title":"Enable FindBugs in the plugin","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars.githubusercontent.com/u/3000480?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"body":"- [x] Enable FindBugs\r\n- [x] Cleanup the most important issues\r\n\r\n@reviewbybees","created_at":"2015-07-16T10:37:27Z","updated_at":"2015-07-20T16:22:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64eaf9fdbff79144b20a6a3a099c658eafbe69c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/4/comments","statuses_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/statuses/25f7fdadfd86bbe4eb6b6a7624eded1245381919","head":{"label":"jenkinsci:findbugs-enable","ref":"findbugs-enable","sha":"25f7fdadfd86bbe4eb6b6a7624eded1245381919","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":4497430,"name":"ldap-plugin","full_name":"jenkinsci/ldap-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/ldap-plugin","description":"","fork":false,"url":"https://api.github.com/repos/jenkinsci/ldap-plugin","forks_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/releases{/id}","created_at":"2012-05-30T16:54:27Z","updated_at":"2015-03-13T01:16:24Z","pushed_at":"2015-07-20T14:37:00Z","git_url":"git://github.com/jenkinsci/ldap-plugin.git","ssh_url":"git@github.com:jenkinsci/ldap-plugin.git","clone_url":"https://github.com/jenkinsci/ldap-plugin.git","svn_url":"https://github.com/jenkinsci/ldap-plugin","homepage":"","size":633,"stargazers_count":10,"watchers_count":10,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":3,"forks":12,"open_issues":3,"watchers":10,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"311012ea9d98763f5b335a76f5a7ea3df8ecabe9","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":4497430,"name":"ldap-plugin","full_name":"jenkinsci/ldap-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/ldap-plugin","description":"","fork":false,"url":"https://api.github.com/repos/jenkinsci/ldap-plugin","forks_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/ldap-plugin/releases{/id}","created_at":"2012-05-30T16:54:27Z","updated_at":"2015-03-13T01:16:24Z","pushed_at":"2015-07-20T14:37:00Z","git_url":"git://github.com/jenkinsci/ldap-plugin.git","ssh_url":"git@github.com:jenkinsci/ldap-plugin.git","clone_url":"https://github.com/jenkinsci/ldap-plugin.git","svn_url":"https://github.com/jenkinsci/ldap-plugin","homepage":"","size":633,"stargazers_count":10,"watchers_count":10,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":3,"forks":12,"open_issues":3,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4"},"html":{"href":"https://github.com/jenkinsci/ldap-plugin/pull/4"},"issue":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/4"},"comments":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/ldap-plugin/statuses/25f7fdadfd86bbe4eb6b6a7624eded1245381919"}}}}