eclipse-ee4j / eclipse-ee4j/jersey

ResponseWriter should use sendError instead of setStatus

Open
#5,286 4 comments 0 reactions 0 assignees View on GitHub
incompatibility
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

In the ResponseWriter the `setStatus(int, String)` method is used which is deprecated.

https://github.com/eclipse-ee4j/jersey/blob/6bd50c8130393aaf7806ced1f99020b10be62582/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java#L147

If used with Jetty as servlet container the message is dropped by intention and therefore no longer visible on the client.

See change: https://github.com/eclipse/jetty.project/commit/5d9c55be8f281c6c2e49825822413c6d203b1487#diff-bcf0034ba316615035f07846625ce33a55705a292049c63976c0393246d48b50

According to the deprecation hint `sendError` should be used instead.

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.