@Produces("text/event-stream;element-type=text/xml") throws exception.
From jaikiran, this is regression after
Fixed those two tests. Apparently the syntax changed and using @Produces("text/event-stream;element-type=text/xml") will throw in some places, thus requiring:
Is that expected @asoldano ?
I don't think so, but might be forgetting something. @ronsigal, any clue?
@asoldano, my guess is that this is an unintentional side-effect of this change https://github.com/resteasy/Resteasy/pull/2361/files#diff-198cf22a0e7c855a4a4b3cf2430f873cL171.
My guess (based on a quick check of the resteasy code) is that this new code:
is no longer satisfied, due to the fact that the MediaType.equals implementation also takes into account the parameters map for equality check. So the constant MediaType.SERVER_SENT_EVENTS_TYPE which doesn't have any parameters isn't considered equal to a MediaType.SERVER_SENT_EVENTS_TYPE which is parsed out of the text/event-stream;element-type=text/xml which will have a parameters map populated with the element-type key/value pair.
For a similar use case for equality check, I had to write something like this in Quarkus a while back https://github.com/quarkusio/quarkus/blob/master/extensions/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java#L541. I guess, at a minimum, something like that probably needs to be done in RestEasy too, since this change looks like an regression (not just in Quarkus but in RestEasy core itself).