Skip to content

add MediaType.isCompatible method #1903

@ghost

Description

A method that compares just the type and subtype and ignores parameters. MediaType.is() could then delegate to this new method.

Same functionality as javax.ws.rs.core.MediaType:

http://docs.oracle.com/javaee/7/api/javax/ws/rs/core/MediaType.html#isCompatible(javax.ws.rs.core.MediaType)

This comparison can be done using the current api by calling withoutParameters() on both types, but this may unnecessarily allocate a new MediaType on each invocation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions