{"action":"created","issue":{"url":"https://api.github.com/repos/junit-team/junit5/issues/1908","repository_url":"https://api.github.com/repos/junit-team/junit5","labels_url":"https://api.github.com/repos/junit-team/junit5/issues/1908/labels{/name}","comments_url":"https://api.github.com/repos/junit-team/junit5/issues/1908/comments","events_url":"https://api.github.com/repos/junit-team/junit5/issues/1908/events","html_url":"https://github.com/junit-team/junit5/issues/1908","id":450892216,"node_id":"MDU6SXNzdWU0NTA4OTIyMTY=","number":1908,"title":"Relax RegisterExtension field type restriction","user":{"login":"philwebb","id":519772,"node_id":"MDQ6VXNlcjUxOTc3Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/519772?v=4","gravatar_id":"","url":"https://api.github.com/users/philwebb","html_url":"https://github.com/philwebb","followers_url":"https://api.github.com/users/philwebb/followers","following_url":"https://api.github.com/users/philwebb/following{/other_user}","gists_url":"https://api.github.com/users/philwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/philwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwebb/subscriptions","organizations_url":"https://api.github.com/users/philwebb/orgs","repos_url":"https://api.github.com/users/philwebb/repos","events_url":"https://api.github.com/users/philwebb/events{/privacy}","received_events_url":"https://api.github.com/users/philwebb/received_events","type":"User","site_admin":false},"labels":[{"id":420911923,"node_id":"MDU6TGFiZWw0MjA5MTE5MjM=","url":"https://api.github.com/repos/junit-team/junit5/labels/component:%20Jupiter","name":"component: Jupiter","color":"11ee99","default":false},{"id":289029959,"node_id":"MDU6TGFiZWwyODkwMjk5NTk=","url":"https://api.github.com/repos/junit-team/junit5/labels/theme:%20extensions","name":"theme: extensions","color":"c7def8","default":false},{"id":293473932,"node_id":"MDU6TGFiZWwyOTM0NzM5MzI=","url":"https://api.github.com/repos/junit-team/junit5/labels/theme:%20programming%20model","name":"theme: programming model","color":"c7def8","default":false},{"id":165165180,"node_id":"MDU6TGFiZWwxNjUxNjUxODA=","url":"https://api.github.com/repos/junit-team/junit5/labels/type:%20enhancement","name":"type: enhancement","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":{"login":"sbrannen","id":104798,"node_id":"MDQ6VXNlcjEwNDc5OA==","avatar_url":"https://avatars0.githubusercontent.com/u/104798?v=4","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"assignees":[{"login":"sbrannen","id":104798,"node_id":"MDQ6VXNlcjEwNDc5OA==","avatar_url":"https://avatars0.githubusercontent.com/u/104798?v=4","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/junit-team/junit5/milestones/37","html_url":"https://github.com/junit-team/junit5/milestone/37","labels_url":"https://api.github.com/repos/junit-team/junit5/milestones/37/labels","id":4122139,"node_id":"MDk6TWlsZXN0b25lNDEyMjEzOQ==","number":37,"title":"5.5 RC1","description":"","creator":{"login":"marcphilipp","id":214207,"node_id":"MDQ6VXNlcjIxNDIwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/214207?v=4","gravatar_id":"","url":"https://api.github.com/users/marcphilipp","html_url":"https://github.com/marcphilipp","followers_url":"https://api.github.com/users/marcphilipp/followers","following_url":"https://api.github.com/users/marcphilipp/following{/other_user}","gists_url":"https://api.github.com/users/marcphilipp/gists{/gist_id}","starred_url":"https://api.github.com/users/marcphilipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcphilipp/subscriptions","organizations_url":"https://api.github.com/users/marcphilipp/orgs","repos_url":"https://api.github.com/users/marcphilipp/repos","events_url":"https://api.github.com/users/marcphilipp/events{/privacy}","received_events_url":"https://api.github.com/users/marcphilipp/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":47,"state":"open","created_at":"2019-03-08T11:31:58Z","updated_at":"2019-06-01T13:22:26Z","due_on":"2019-06-06T07:00:00Z","closed_at":null},"comments":1,"created_at":"2019-05-31T16:57:39Z","updated_at":"2019-06-01T13:22:51Z","closed_at":null,"author_association":"NONE","body":"Due to the checks in [ExtensionUtils.IsNonStaticExtensionField](https://github.com/junit-team/junit5/blob/463a838002b1603853e8e5cb528d4a9ade9a22d7/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ExtensionUtils.java#L140) and [ExtensionUtils.IsStaticExtensionField](https://github.com/junit-team/junit5/blob/463a838002b1603853e8e5cb528d4a9ade9a22d7/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ExtensionUtils.java#L158) it is not currently possible to use `@RegisterExtension` on fields that do not implement `Extension`. Furthermore, no warning or error is produced telling the developer that the extension is not active.\r\n\r\nI wonder if this restriction could be relaxed, and the `@RegisterExtension` annotation alone be used as the trigger. If the actual field instance does not implement `Extension` then an error could be raised.\r\n\r\nThe specific driver for this issue is to allow a `@RegisterExtension` class that does not present JUnit specific APIs to the user. i.e.:\r\n\r\n```java\r\npublic class UserFacingApi {\r\n  // .. API methods the user will want\r\n}\r\n\r\npublic class ExtensionClass extends UserFacingApi implement Extension... {\r\n  // .. JUnit methods that the user should not call\r\n}\r\n```\r\n\r\n```\r\n@RegisterExtension\r\nprivate UserFacingApi userFacing = new ExtensionClass();\r\n```\r\n\r\n(see https://github.com/spring-projects/spring-boot/issues/17029 for a real use-case)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/junit-team/junit5/issues/comments/497944933","html_url":"https://github.com/junit-team/junit5/issues/1908#issuecomment-497944933","issue_url":"https://api.github.com/repos/junit-team/junit5/issues/1908","id":497944933,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5Nzk0NDkzMw==","user":{"login":"sbrannen","id":104798,"node_id":"MDQ6VXNlcjEwNDc5OA==","avatar_url":"https://avatars0.githubusercontent.com/u/104798?v=4","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"created_at":"2019-06-01T13:22:51Z","updated_at":"2019-06-01T13:22:51Z","author_association":"MEMBER","body":"_in progress_: investigating options"}}
{"actor":{"display_login":"sbrannen"}}