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");
|
Objects.requireNonNull(inputUri, "Input URI must not be null");
|
||||||
String httpScheme = inputUri.getScheme();
|
String httpScheme = inputUri.getScheme();
|
||||||
|
if (httpScheme == null)
|
||||||
|
throw new URISyntaxException(inputUri.toString(), "Undefined HTTP scheme");
|
||||||
|
|
||||||
if ("ws".equalsIgnoreCase(httpScheme) || "wss".equalsIgnoreCase(httpScheme))
|
if ("ws".equalsIgnoreCase(httpScheme) || "wss".equalsIgnoreCase(httpScheme))
|
||||||
return inputUri;
|
return inputUri;
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,10 @@ public final class ClientUpgradeRequest implements UpgradeRequest
|
||||||
this.host = null;
|
this.host = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the no-args constructor instead.
|
||||||
|
* @see ClientUpgradeRequest#ClientUpgradeRequest()
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ClientUpgradeRequest(URI uri)
|
public ClientUpgradeRequest(URI uri)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue