jakartaee / jakartaee/websocket

@PathParam type conversion

Open
#326 5 comments 0 reactions 0 assignees View on GitHub
API (Both) enhancement
Dominant language
Java
Stars
78
Forks
47
Avg merge
1h 32m
Merged PRs (30d)
1

Description

The current spec states:
> The method parameter may be of type String, any Java primitive type or any boxed version thereof.

This is somewhat limiting so could be opened up to match the same specification as JAX-RS:

> * Have a static method named `valueOf` or `fromString` that accepts a single String argument (see, for example, `Integer.valueOf(String)`).
> * Have a registered implementation of `ParamConverterProvider` JAX-RS extension SPI that returns a `ParamConverter` instance capable of a "from string" conversion for the type.
> Any failure should respond with a 404 Not Found.

This would promote consistency and clean up the code.

Contributor guide

Open the contributing guide

Research direction

The issue names @PathParam and the JAX-RS ParamConverterProvider SPI; start by locating the current @PathParam conversion code and the applicable WebSocket specification text. Compare supported conversions with the listed valueOf/fromString and converter-provider rules, then verify conversion failures produce 404 responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.