-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #7573 - fix support in websocket for class path param types
Signed-off-by: Lachlan Roberts <[email protected]> (cherry picked from commit 7081a77)
- Loading branch information
1 parent
89845f2
commit ce8825b
Showing
20 changed files
with
601 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...src/test/java/org/eclipse/jetty/websocket/jakarta/tests/pathparam/BooleanClassSocket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.jakarta.tests.pathparam; | ||
|
||
import jakarta.websocket.OnOpen; | ||
import jakarta.websocket.Session; | ||
import jakarta.websocket.server.PathParam; | ||
import jakarta.websocket.server.ServerEndpoint; | ||
|
||
@ServerEndpoint("/pathParam/id/{id}") | ||
public class BooleanClassSocket | ||
{ | ||
@OnOpen | ||
public void onOpen(Session session, @PathParam("id") Boolean id) throws Exception | ||
{ | ||
session.getBasicRemote().sendText("id: " + id); | ||
session.close(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
.../src/test/java/org/eclipse/jetty/websocket/jakarta/tests/pathparam/BooleanTypeSocket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.jakarta.tests.pathparam; | ||
|
||
import jakarta.websocket.OnOpen; | ||
import jakarta.websocket.Session; | ||
import jakarta.websocket.server.PathParam; | ||
import jakarta.websocket.server.ServerEndpoint; | ||
|
||
@ServerEndpoint("/pathParam/id/{id}") | ||
public class BooleanTypeSocket | ||
{ | ||
@OnOpen | ||
public void onOpen(Session session, @PathParam("id") boolean id) throws Exception | ||
{ | ||
session.getBasicRemote().sendText("id: " + id); | ||
session.close(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...ts/src/test/java/org/eclipse/jetty/websocket/jakarta/tests/pathparam/ByteClassSocket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.jakarta.tests.pathparam; | ||
|
||
import jakarta.websocket.OnOpen; | ||
import jakarta.websocket.Session; | ||
import jakarta.websocket.server.PathParam; | ||
import jakarta.websocket.server.ServerEndpoint; | ||
|
||
@ServerEndpoint("/pathParam/id/{id}") | ||
public class ByteClassSocket | ||
{ | ||
@OnOpen | ||
public void onOpen(Session session, @PathParam("id") Byte id) throws Exception | ||
{ | ||
session.getBasicRemote().sendText("id: " + id); | ||
session.close(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...sts/src/test/java/org/eclipse/jetty/websocket/jakarta/tests/pathparam/ByteTypeSocket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.jakarta.tests.pathparam; | ||
|
||
import jakarta.websocket.OnOpen; | ||
import jakarta.websocket.Session; | ||
import jakarta.websocket.server.PathParam; | ||
import jakarta.websocket.server.ServerEndpoint; | ||
|
||
@ServerEndpoint("/pathParam/id/{id}") | ||
public class ByteTypeSocket | ||
{ | ||
@OnOpen | ||
public void onOpen(Session session, @PathParam("id") byte id) throws Exception | ||
{ | ||
session.getBasicRemote().sendText("id: " + id); | ||
session.close(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...c/test/java/org/eclipse/jetty/websocket/jakarta/tests/pathparam/CharacterClassSocket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.jakarta.tests.pathparam; | ||
|
||
import jakarta.websocket.OnOpen; | ||
import jakarta.websocket.Session; | ||
import jakarta.websocket.server.PathParam; | ||
import jakarta.websocket.server.ServerEndpoint; | ||
|
||
@ServerEndpoint("/pathParam/id/{id}") | ||
public class CharacterClassSocket | ||
{ | ||
@OnOpen | ||
public void onOpen(Session session, @PathParam("id") Character id) throws Exception | ||
{ | ||
session.getBasicRemote().sendText("id: " + id); | ||
session.close(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...rc/test/java/org/eclipse/jetty/websocket/jakarta/tests/pathparam/CharacterTypeSocket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.jakarta.tests.pathparam; | ||
|
||
import jakarta.websocket.OnOpen; | ||
import jakarta.websocket.Session; | ||
import jakarta.websocket.server.PathParam; | ||
import jakarta.websocket.server.ServerEndpoint; | ||
|
||
@ServerEndpoint("/pathParam/id/{id}") | ||
public class CharacterTypeSocket | ||
{ | ||
@OnOpen | ||
public void onOpen(Session session, @PathParam("id") char id) throws Exception | ||
{ | ||
session.getBasicRemote().sendText("id: " + id); | ||
session.close(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
.../src/test/java/org/eclipse/jetty/websocket/jakarta/tests/pathparam/DoubleClassSocket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.jakarta.tests.pathparam; | ||
|
||
import jakarta.websocket.OnOpen; | ||
import jakarta.websocket.Session; | ||
import jakarta.websocket.server.PathParam; | ||
import jakarta.websocket.server.ServerEndpoint; | ||
|
||
@ServerEndpoint("/pathParam/id/{id}") | ||
public class DoubleClassSocket | ||
{ | ||
@OnOpen | ||
public void onOpen(Session session, @PathParam("id") Double id) throws Exception | ||
{ | ||
session.getBasicRemote().sendText("id: " + id); | ||
session.close(); | ||
} | ||
} |
Oops, something went wrong.