@Deprecate a method as it's not needed anymore

This commit is contained in:
Norman Maurer 2013-05-17 22:00:55 +02:00
parent 8a5e249d6f
commit aaca9df99a
5 changed files with 2 additions and 4 deletions

View File

@ -239,6 +239,7 @@ public abstract class WebSocketServerHandshaker {
for (String supportedSubprotocol: subprotocols) {
if (SUB_PROTOCOL_WILDCARD.equals(supportedSubprotocol)
|| requestedSubprotocol.equals(supportedSubprotocol)) {
selectedSubprotocol = requestedSubprotocol;
return requestedSubprotocol;
}
}
@ -258,6 +259,7 @@ public abstract class WebSocketServerHandshaker {
return selectedSubprotocol;
}
@Deprecated
protected void setSelectedSubprotocol(String value) {
selectedSubprotocol = value;
}

View File

@ -141,7 +141,6 @@ public class WebSocketServerHandshaker00 extends WebSocketServerHandshaker {
throw new WebSocketHandshakeException("Requested subprotocol(s) not supported: " + subprotocols);
} else {
res.headers().add(SEC_WEBSOCKET_PROTOCOL, selectedSubprotocol);
setSelectedSubprotocol(selectedSubprotocol);
}
}

View File

@ -126,7 +126,6 @@ public class WebSocketServerHandshaker07 extends WebSocketServerHandshaker {
throw new WebSocketHandshakeException("Requested subprotocol(s) not supported: " + subprotocols);
} else {
res.headers().add(Names.SEC_WEBSOCKET_PROTOCOL, selectedSubprotocol);
setSelectedSubprotocol(selectedSubprotocol);
}
}
return res;

View File

@ -125,7 +125,6 @@ public class WebSocketServerHandshaker08 extends WebSocketServerHandshaker {
throw new WebSocketHandshakeException("Requested subprotocol(s) not supported: " + subprotocols);
} else {
res.headers().add(Names.SEC_WEBSOCKET_PROTOCOL, selectedSubprotocol);
setSelectedSubprotocol(selectedSubprotocol);
}
}
return res;

View File

@ -124,7 +124,6 @@ public class WebSocketServerHandshaker13 extends WebSocketServerHandshaker {
"Requested subprotocol(s) not supported: " + subprotocols);
} else {
res.headers().add(Names.SEC_WEBSOCKET_PROTOCOL, selectedSubprotocol);
setSelectedSubprotocol(selectedSubprotocol);
}
}
return res;