{"action":"created","comment":{"url":"https://api.github.com/repos/gradle/gradle/pulls/comments/191809692","pull_request_review_id":124456265,"id":191809692,"diff_hunk":"@@ -63,6 +63,15 @@ class ExtensionsStorageTest extends Specification {\n         thrown UnknownDomainObjectException\n     }\n \n+    def \"configure extension\"() {\n+        when:\n+        def shouldNotExist = \"shouldNotExist\"\n+        storage.configureExtension(shouldNotExist, {})\n+        then:\n+        def t = thrown UnknownDomainObjectException\n+        t.message == storage.extensionWithNameDoesNotExistMessage(shouldNotExist)","path":"subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/ExtensionsStorageTest.groovy","position":10,"original_position":10,"commit_id":"cc5404cbabb4765d5e50fad8eeaeb6cbe472988a","original_commit_id":"cc5404cbabb4765d5e50fad8eeaeb6cbe472988a","user":{"login":"JLLeitschuh","id":1323708,"avatar_url":"https://avatars2.githubusercontent.com/u/1323708?v=4","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"body":"Will do.\r\n","created_at":"2018-05-30T15:17:42Z","updated_at":"2018-05-30T15:17:42Z","html_url":"https://github.com/gradle/gradle/pull/5547#discussion_r191809692","pull_request_url":"https://api.github.com/repos/gradle/gradle/pulls/5547","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments/191809692"},"html":{"href":"https://github.com/gradle/gradle/pull/5547#discussion_r191809692"},"pull_request":{"href":"https://api.github.com/repos/gradle/gradle/pulls/5547"}},"in_reply_to_id":191750621},"pull_request":{"url":"https://api.github.com/repos/gradle/gradle/pulls/5547","id":190724278,"html_url":"https://github.com/gradle/gradle/pull/5547","diff_url":"https://github.com/gradle/gradle/pull/5547.diff","patch_url":"https://github.com/gradle/gradle/pull/5547.patch","issue_url":"https://api.github.com/repos/gradle/gradle/issues/5547","number":5547,"state":"open","locked":false,"title":"Throw UnknownDomainObjectException when extension isn't found","user":{"login":"JLLeitschuh","id":1323708,"avatar_url":"https://avatars2.githubusercontent.com/u/1323708?v=4","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"body":"Getting a NullPointerException is unhelpful when you forget to add\r\na plugin onto a project and go to try to configure an extension.\r\n\r\nBefore, you would have gotten an exception similar to this:\r\n```\r\nCaused by: java.lang.NullPointerException\r\n        at org.gradle.api.internal.plugins.ExtensionsStorage.configureExtension(ExtensionsStorage.java:67)\r\n        at org.gradle.api.internal.plugins.DefaultConvention.configure(DefaultConvention.java:222)\r\n        at org.gradle.kotlin.dsl.AccessorsKt.spotless(accessors.kt:63)\r\n```\r\n\r\n### Context\r\n@Octogonapus was refactoring his build to the Gradle Kotlin DSL when he was configuring a plugin's extension on a project that didn't have that plugin applied.\r\nThe resulting `NullPointerException` was confusing. Hopefully, this will clear up some confusion for users.\r\n\r\n### Contributor Checklist\r\n- [x] [Review Contribution Guidelines](https://github.com/gradle/gradle/blob/master/.github/CONTRIBUTING.md)\r\n- [x] Make sure that all commits are [signed off](https://git-scm.com/docs/git-commit#git-commit---signoff) to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).\r\n- [x] Check [\"Allow edit from maintainers\" option](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) in pull request so that additional changes can be pushed by Gradle team\r\n- [ ] Provide integration tests (under `<subproject>/src/integTest`) to verify changes from a user perspective\r\n- [x] Provide unit tests (under `<subproject>/src/test`) to verify logic\r\n- [x] Update User Guide, DSL Reference, and Javadoc for public-facing changes\r\n- [x] Ensure that tests pass locally: `./gradlew <changed-subproject>:check`\r\n\r\n### Gradle Core Team Checklist\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation\r\n- [ ] Recognize contributor in release notes\r\n","created_at":"2018-05-26T04:01:45Z","updated_at":"2018-05-30T15:17:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afcab9cf98845ab84807e01188647170278b6c7c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":460356597,"url":"https://api.github.com/repos/gradle/gradle/labels/a:bug","name":"a:bug","color":"d93f0b","default":false},{"id":478384995,"url":"https://api.github.com/repos/gradle/gradle/labels/from:contributor","name":"from:contributor","color":"0052cc","default":false},{"id":285742270,"url":"https://api.github.com/repos/gradle/gradle/labels/in:core","name":"in:core","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/gradle/gradle/pulls/5547/commits","review_comments_url":"https://api.github.com/repos/gradle/gradle/pulls/5547/comments","review_comment_url":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/5547/comments","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/cc5404cbabb4765d5e50fad8eeaeb6cbe472988a","head":{"label":"JLLeitschuh:improvement/JLL/better_exception_for_configure_extension","ref":"improvement/JLL/better_exception_for_configure_extension","sha":"cc5404cbabb4765d5e50fad8eeaeb6cbe472988a","user":{"login":"JLLeitschuh","id":1323708,"avatar_url":"https://avatars2.githubusercontent.com/u/1323708?v=4","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"repo":{"id":99699085,"name":"gradle","full_name":"JLLeitschuh/gradle","owner":{"login":"JLLeitschuh","id":1323708,"avatar_url":"https://avatars2.githubusercontent.com/u/1323708?v=4","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JLLeitschuh/gradle","description":"Adaptable, fast automation for all","fork":true,"url":"https://api.github.com/repos/JLLeitschuh/gradle","forks_url":"https://api.github.com/repos/JLLeitschuh/gradle/forks","keys_url":"https://api.github.com/repos/JLLeitschuh/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JLLeitschuh/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JLLeitschuh/gradle/teams","hooks_url":"https://api.github.com/repos/JLLeitschuh/gradle/hooks","issue_events_url":"https://api.github.com/repos/JLLeitschuh/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/JLLeitschuh/gradle/events","assignees_url":"https://api.github.com/repos/JLLeitschuh/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/JLLeitschuh/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/JLLeitschuh/gradle/tags","blobs_url":"https://api.github.com/repos/JLLeitschuh/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JLLeitschuh/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JLLeitschuh/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/JLLeitschuh/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JLLeitschuh/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/JLLeitschuh/gradle/languages","stargazers_url":"https://api.github.com/repos/JLLeitschuh/gradle/stargazers","contributors_url":"https://api.github.com/repos/JLLeitschuh/gradle/contributors","subscribers_url":"https://api.github.com/repos/JLLeitschuh/gradle/subscribers","subscription_url":"https://api.github.com/repos/JLLeitschuh/gradle/subscription","commits_url":"https://api.github.com/repos/JLLeitschuh/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/JLLeitschuh/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/JLLeitschuh/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/JLLeitschuh/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/JLLeitschuh/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/JLLeitschuh/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JLLeitschuh/gradle/merges","archive_url":"https://api.github.com/repos/JLLeitschuh/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JLLeitschuh/gradle/downloads","issues_url":"https://api.github.com/repos/JLLeitschuh/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/JLLeitschuh/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/JLLeitschuh/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/JLLeitschuh/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JLLeitschuh/gradle/labels{/name}","releases_url":"https://api.github.com/repos/JLLeitschuh/gradle/releases{/id}","deployments_url":"https://api.github.com/repos/JLLeitschuh/gradle/deployments","created_at":"2017-08-08T13:59:54Z","updated_at":"2018-05-26T03:00:29Z","pushed_at":"2018-05-26T03:58:01Z","git_url":"git://github.com/JLLeitschuh/gradle.git","ssh_url":"git@github.com:JLLeitschuh/gradle.git","clone_url":"https://github.com/JLLeitschuh/gradle.git","svn_url":"https://github.com/JLLeitschuh/gradle","homepage":"https://gradle.org","size":211013,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gradle:master","ref":"master","sha":"2af93fd28ec9cf76e9d2c72cb6569c984c3af706","user":{"login":"gradle","id":124156,"avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"repo":{"id":302322,"name":"gradle","full_name":"gradle/gradle","owner":{"login":"gradle","id":124156,"avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gradle/gradle","description":"Adaptable, fast automation for all","fork":false,"url":"https://api.github.com/repos/gradle/gradle","forks_url":"https://api.github.com/repos/gradle/gradle/forks","keys_url":"https://api.github.com/repos/gradle/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gradle/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gradle/gradle/teams","hooks_url":"https://api.github.com/repos/gradle/gradle/hooks","issue_events_url":"https://api.github.com/repos/gradle/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/gradle/gradle/events","assignees_url":"https://api.github.com/repos/gradle/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/gradle/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/gradle/gradle/tags","blobs_url":"https://api.github.com/repos/gradle/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gradle/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gradle/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gradle/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/gradle/gradle/languages","stargazers_url":"https://api.github.com/repos/gradle/gradle/stargazers","contributors_url":"https://api.github.com/repos/gradle/gradle/contributors","subscribers_url":"https://api.github.com/repos/gradle/gradle/subscribers","subscription_url":"https://api.github.com/repos/gradle/gradle/subscription","commits_url":"https://api.github.com/repos/gradle/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gradle/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gradle/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gradle/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gradle/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/gradle/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gradle/gradle/merges","archive_url":"https://api.github.com/repos/gradle/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gradle/gradle/downloads","issues_url":"https://api.github.com/repos/gradle/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/gradle/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/gradle/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/gradle/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gradle/gradle/labels{/name}","releases_url":"https://api.github.com/repos/gradle/gradle/releases{/id}","deployments_url":"https://api.github.com/repos/gradle/gradle/deployments","created_at":"2009-09-09T18:27:19Z","updated_at":"2018-05-30T14:42:32Z","pushed_at":"2018-05-30T15:16:44Z","git_url":"git://github.com/gradle/gradle.git","ssh_url":"git@github.com:gradle/gradle.git","clone_url":"https://github.com/gradle/gradle.git","svn_url":"https://github.com/gradle/gradle","homepage":"https://gradle.org","size":213604,"stargazers_count":6915,"watchers_count":6915,"language":"Groovy","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2190,"mirror_url":null,"archived":false,"open_issues_count":1088,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2190,"open_issues":1088,"watchers":6915,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/5547"},"html":{"href":"https://github.com/gradle/gradle/pull/5547"},"issue":{"href":"https://api.github.com/repos/gradle/gradle/issues/5547"},"comments":{"href":"https://api.github.com/repos/gradle/gradle/issues/5547/comments"},"review_comments":{"href":"https://api.github.com/repos/gradle/gradle/pulls/5547/comments"},"review_comment":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gradle/gradle/pulls/5547/commits"},"statuses":{"href":"https://api.github.com/repos/gradle/gradle/statuses/cc5404cbabb4765d5e50fad8eeaeb6cbe472988a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"JLLeitschuh"}}