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
|
||||
public String getNegotiatedSubprotocol()
|
||||
{
|
||||
return getUpgradeResponse().getAcceptedSubProtocol();
|
||||
String acceptedSubProtocol = getUpgradeResponse().getAcceptedSubProtocol();
|
||||
if (acceptedSubProtocol == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return acceptedSubProtocol;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue