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
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment (build 21+35)
OpenJDK 64-Bit Server VM (build 21+35, mixed mode, sharing)
OS: Linux
Problem Description
The Javadoc for the io.helidon.common.uri.UriQuery interface's get method says:
/**
* Get the first value.
*
* @param name name of the parameter
* @return first value
* @throws NoSuchElementException in case the name is not present
*/
String get(String name) throws NoSuchElementException;
Unfortunately, the implementation of UriQueryEmpty has:
@Override
public String get(String name) {
throw new UnsupportedOperationException("Empty query");
}
This means you'll get an UnsupportedOperationException instead of the expected NoSuchElementException if you're trying to get a parameter from a query that didn't contain any parameters.
Steps to reproduce
Just try calling ServerRequest.query().get("x") for any incoming query that has no parameters.
The text was updated successfully, but these errors were encountered:
Environment Details
Problem Description
The Javadoc for the
io.helidon.common.uri.UriQuery
interface'sget
method says:Unfortunately, the implementation of
UriQueryEmpty
has:This means you'll get an
UnsupportedOperationException
instead of the expectedNoSuchElementException
if you're trying to get a parameter from a query that didn't contain any parameters.Steps to reproduce
Just try calling
ServerRequest.query().get("x")
for any incoming query that has no parameters.The text was updated successfully, but these errors were encountered: