Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSockets - "Unsupported PathParam Type: java.lang.Integer" #7573

Closed
andrus opened this issue Feb 13, 2022 · 2 comments
Closed

WebSockets - "Unsupported PathParam Type: java.lang.Integer" #7573

andrus opened this issue Feb 13, 2022 · 2 comments
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@andrus
Copy link

andrus commented Feb 13, 2022

Jetty version(s)

10.0.7

Java version/vendor (use: java -version)

11.0.12 (Temurin)

OS type/version

MacOS

Description
WebSocket endpoint like this:

@ServerEndpoint(value = "/my/{id}")
public class Endpoint {

    @OnOpen
    public void onOpen(@PathParam("id") Integer id, Session session) {
        
    }
}

on Jetty startup results in an exception here - "Unsupported PathParam Type: java.lang.Integer". Changing Integer to int fixes the issue. The expected behavior would be for PathParamIdentifier to compare the type against both X.TYPE and X.class, otherwise boxed types will not work.

@andrus andrus added the Bug For general bugs on Jetty side label Feb 13, 2022
@lachlan-roberts lachlan-roberts self-assigned this Feb 14, 2022
lachlan-roberts added a commit that referenced this issue Feb 14, 2022
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@lachlan-roberts
Copy link
Contributor

Opened PR #7579 to fix this.

lachlan-roberts added a commit that referenced this issue Feb 16, 2022
…Param

Issue #7573 - fix support in websocket for class path param types
@lachlan-roberts lachlan-roberts added this to To do in Jetty 10.0.9/11.0.9 (FROZEN) via automation Feb 16, 2022
@lachlan-roberts
Copy link
Contributor

fixed with PR #7579, will be available with the release of 10.0.9/11.0.9.

Jetty 10.0.9/11.0.9 (FROZEN) automation moved this from To do to Done Feb 16, 2022
joakime pushed a commit that referenced this issue Feb 25, 2022
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
(cherry picked from commit 7081a77)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
No open projects
Development

No branches or pull requests

2 participants