jetty / jetty/jetty.project

org.eclipse.jetty.ee9.nested.Request method returning `null`

Open
#14,094 3 comments 0 reactions 0 assignees View on GitHub
Question Specification
Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
3d 56m
Merged PRs (30d)
48

Description

**Jetty version(s)** Jetty 12.1.4

**Jetty Environment** ee9

**Description**

Various functions of the `org.eclipse.jetty.ee9.nested` class, for example [`getRequestURI()`](https://github.com/jetty/jetty.project/blob/jetty-12.1.x/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/Request.java#L1276), are allowed to return `null`. This contrasts with the interface description of the method (https://jakarta.ee/specifications/servlet/5.0/apidocs/jakarta/servlet/http/httpservletrequest#getRequestURI()), and it makes debugging a very erratic process.

My questions:
1. What is the reason for the variant behavior?
2. I cannot find hints to the current design choices in the Java sources. Is the Jetty-specific behavior documented somewhere?
3. Unchecked exceptions would not be ideal either, but they could at least give some more hints on what is going on. Have you thought about that?

Contributor guide

Open the contributing guide

Research direction

Start with jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/Request.java, especially getRequestURI(), and compare its behavior with the Jakarta Servlet 5.0 HttpServletRequest description. Review the issue's three questions and Jetty 12.1.4 ee9 behavior; done means the null-returning behavior and any intended documentation or change are clearly resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.