JSR-356 returning empty string (per javadoc) instead of null for Session.getNegotiatedSubprotocol()
This commit is contained in:
parent
153c844238
commit
9846aee917
|
@ -254,7 +254,12 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess
|
||||||
@Override
|
@Override
|
||||||
public String getNegotiatedSubprotocol()
|
public String getNegotiatedSubprotocol()
|
||||||
{
|
{
|
||||||
return getUpgradeResponse().getAcceptedSubProtocol();
|
String acceptedSubProtocol = getUpgradeResponse().getAcceptedSubProtocol();
|
||||||
|
if (acceptedSubProtocol == null)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return acceptedSubProtocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue