jakartaee / jakartaee/rest

Empty payload should never enforce a MBR to handle the Response

Open
#798 24 comments 0 reactions 1 assignee Claimed by @mkarg View on GitHub
api enhancement javadoc
Dominant language
Java
Stars
400
Forks
143
PR merge metrics
No merged PRs in 30d

Description

Seems jaxrs 2.1 forces MBR to throw a no content exception when stream is empty.
It leads to several issues and should be reverted:

1. It breaks MBR responsability which is only about serialization
2. It breaks specs integration (you cant handle with an exception mapper native exceptions for this case) - and forces a third jaxrs integration through an interceptor instead of letting the rezponsability to either mappers or the ioc itself
3. It breaks backward compatibility (2 being one example) which is a no go for any javaee/jakartaee decision
4. This is rarely desired and all apps will want a payload for that case

Please revert that change before it gets adopted (we are still around jaxrs 2.0 in the industry and libs)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.