{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/700","repository_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api","labels_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/700/labels{/name}","comments_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/700/comments","events_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/700/events","html_url":"https://github.com/eclipse-ee4j/jaxrs-api/pull/700","id":380260473,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwNTAxMzk5","number":700,"title":"Improve MediaType compatibility check","user":{"login":"mszabo-wikia","id":2721291,"node_id":"MDQ6VXNlcjI3MjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2721291?v=4","gravatar_id":"","url":"https://api.github.com/users/mszabo-wikia","html_url":"https://github.com/mszabo-wikia","followers_url":"https://api.github.com/users/mszabo-wikia/followers","following_url":"https://api.github.com/users/mszabo-wikia/following{/other_user}","gists_url":"https://api.github.com/users/mszabo-wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/mszabo-wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mszabo-wikia/subscriptions","organizations_url":"https://api.github.com/users/mszabo-wikia/orgs","repos_url":"https://api.github.com/users/mszabo-wikia/repos","events_url":"https://api.github.com/users/mszabo-wikia/events{/privacy}","received_events_url":"https://api.github.com/users/mszabo-wikia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-13T14:46:45Z","updated_at":"2018-11-15T16:01:27Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/pulls/700","html_url":"https://github.com/eclipse-ee4j/jaxrs-api/pull/700","diff_url":"https://github.com/eclipse-ee4j/jaxrs-api/pull/700.diff","patch_url":"https://github.com/eclipse-ee4j/jaxrs-api/pull/700.patch"},"body":"As described in https://github.com/eclipse-ee4j/jaxrs-api/issues/543, the `javax.ws.rs.core.MediaType#isCompatible` method is not behaving as expected when one of the media types to be compared has a wildcard type and explicit subtype, e.g. `*/json`. The referred media type is considered to be compatible with any type, even if the subtypes do not match (e.g. `*/json` will be considered compatible with `application/octet-stream`). As such, if an implementation of JAX-RS relies on `javax.ws.rs.core.MediaType#isCompatible` to determine if the media type of an incoming request is compatible with the accepted media types of a resource method, as per Section 3.5 of the specification (via Step 3a in Section 3.7.2), it might result in a surprising behaviour for the end-user.\r\n\r\nThis change aims to improve and clarify the logic of `javax.ws.rs.core.MediaType#isCompatible` so that it handles wildcard types better, and adds unit tests for the referred method.\r\n\r\nResolves #543 \r\n\r\nSigned-off-by: mszabo-wikia <mszabo@wikia-inc.com>"},"comment":{"url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/comments/439091895","html_url":"https://github.com/eclipse-ee4j/jaxrs-api/pull/700#issuecomment-439091895","issue_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/700","id":439091895,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTA5MTg5NQ==","user":{"login":"mszabo-wikia","id":2721291,"node_id":"MDQ6VXNlcjI3MjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2721291?v=4","gravatar_id":"","url":"https://api.github.com/users/mszabo-wikia","html_url":"https://github.com/mszabo-wikia","followers_url":"https://api.github.com/users/mszabo-wikia/followers","following_url":"https://api.github.com/users/mszabo-wikia/following{/other_user}","gists_url":"https://api.github.com/users/mszabo-wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/mszabo-wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mszabo-wikia/subscriptions","organizations_url":"https://api.github.com/users/mszabo-wikia/orgs","repos_url":"https://api.github.com/users/mszabo-wikia/repos","events_url":"https://api.github.com/users/mszabo-wikia/events{/privacy}","received_events_url":"https://api.github.com/users/mszabo-wikia/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T16:01:27Z","updated_at":"2018-11-15T16:01:27Z","author_association":"NONE","body":"Great, so just to clarify, shall I add a separate test case verifying the (in)compatibility of common media types, as suggested above?"}}
{"actor":{"display_login":"mszabo-wikia"}}