add javadoc and null check for HttpScheme
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
148cf38c5d
commit
10ed23f22d
|
@ -103,6 +103,9 @@ public final class WSURI
|
|||
{
|
||||
Objects.requireNonNull(inputUri, "Input URI must not be null");
|
||||
String httpScheme = inputUri.getScheme();
|
||||
if (httpScheme == null)
|
||||
throw new URISyntaxException(inputUri.toString(), "Undefined HTTP scheme");
|
||||
|
||||
if ("ws".equalsIgnoreCase(httpScheme) || "wss".equalsIgnoreCase(httpScheme))
|
||||
return inputUri;
|
||||
|
||||
|
|
|
@ -50,6 +50,10 @@ public final class ClientUpgradeRequest implements UpgradeRequest
|
|||
this.host = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use the no-args constructor instead.
|
||||
* @see ClientUpgradeRequest#ClientUpgradeRequest()
|
||||
*/
|
||||
@Deprecated
|
||||
public ClientUpgradeRequest(URI uri)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue