You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if a user adds a non-valid parameter to methods annotated with @onError to classes annotated with @ServerEndpoint or @ClientEndpoint, it will create a server error, leaving the server unresponsive. However, the user is not notified of this in the IDE. Only a small error shows up in the terminal.
For this reason, we need to apply a validation of parameters for the onError lifecycle method.
Specification:
Valid parameters are defined as "an optional Session parameter, a mandatory Throwable parameter, and zero to n parameters (of type String, any Java primitive type or boxed version thereof) annotated with a @PathParam annotation as parameters" per JakartaEE specs found here
@onErrorpublicvoidnotValidError(Sessionsession) {
System.out.println("Program requested " + invalidParameter + " using " + session.getId());
session.getAsyncRemote().sendText("I am invalid. I am missing a mandatory Throwable parameter");
}
Type of language feature proposed:
Select all that apply
diagnostic
quick-fix
snippet
other, please specify:
The text was updated successfully, but these errors were encountered:
Description:
Currently, if a user adds a non-valid parameter to methods annotated with
@onError
to classes annotated with@ServerEndpoint
or@ClientEndpoint
, it will create a server error, leaving the server unresponsive. However, the user is not notified of this in the IDE. Only a small error shows up in the terminal.For this reason, we need to apply a validation of parameters for the
onError
lifecycle method.Specification:
Valid parameters are defined as "an optional Session parameter, a mandatory Throwable parameter, and zero to n parameters (of type String, any Java primitive type or boxed version thereof) annotated with a @PathParam annotation as parameters" per JakartaEE specs found here
Acceptable
Error
Type of language feature proposed:
Select all that apply
The text was updated successfully, but these errors were encountered: