Typo fix in WebSocketServerExtension (#8829)
Motivation: We had a typo in the name Modifications: Fix typo in method name Result: Method name has no typo
This commit is contained in:
parent
8069226ef1
commit
dcaec33a86
@ -26,7 +26,6 @@ public interface WebSocketServerExtension extends WebSocketExtension {
|
||||
*
|
||||
* @return the acknowledged extension configuration.
|
||||
*/
|
||||
//TODO: after migrating to JDK 8 rename this to 'newResponseData()' and mark old as deprecated with default method
|
||||
WebSocketExtensionData newReponseData();
|
||||
WebSocketExtensionData newResponseData();
|
||||
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class WebSocketServerExtensionHandler extends ChannelDuplexHandler {
|
||||
String headerValue = response.headers().getAsString(HttpHeaderNames.SEC_WEBSOCKET_EXTENSIONS);
|
||||
|
||||
for (WebSocketServerExtension extension : validExtensions) {
|
||||
WebSocketExtensionData extensionData = extension.newReponseData();
|
||||
WebSocketExtensionData extensionData = extension.newResponseData();
|
||||
headerValue = WebSocketExtensionUtil.appendExtension(headerValue,
|
||||
extensionData.name(), extensionData.parameters());
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public final class DeflateFrameServerExtensionHandshaker implements WebSocketSer
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebSocketExtensionData newReponseData() {
|
||||
public WebSocketExtensionData newResponseData() {
|
||||
return new WebSocketExtensionData(extensionName, Collections.emptyMap());
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ public final class PerMessageDeflateServerExtensionHandshaker implements WebSock
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebSocketExtensionData newReponseData() {
|
||||
public WebSocketExtensionData newResponseData() {
|
||||
HashMap<String, String> parameters = new HashMap<>(4);
|
||||
if (serverNoContext) {
|
||||
parameters.put(SERVER_NO_CONTEXT, null);
|
||||
|
@ -54,7 +54,7 @@ public class WebSocketServerExtensionHandlerTest {
|
||||
thenReturn(null);
|
||||
|
||||
when(mainExtensionMock.rsv()).thenReturn(WebSocketExtension.RSV1);
|
||||
when(mainExtensionMock.newReponseData()).thenReturn(
|
||||
when(mainExtensionMock.newResponseData()).thenReturn(
|
||||
new WebSocketExtensionData("main", Collections.emptyMap()));
|
||||
when(mainExtensionMock.newExtensionEncoder()).thenReturn(new DummyEncoder());
|
||||
when(mainExtensionMock.newExtensionDecoder()).thenReturn(new DummyDecoder());
|
||||
@ -87,7 +87,7 @@ public class WebSocketServerExtensionHandlerTest {
|
||||
verify(fallbackHandshakerMock, atLeastOnce()).handshakeExtension(webSocketExtensionDataMatcher("fallback"));
|
||||
|
||||
verify(mainExtensionMock, atLeastOnce()).rsv();
|
||||
verify(mainExtensionMock).newReponseData();
|
||||
verify(mainExtensionMock).newResponseData();
|
||||
verify(mainExtensionMock).newExtensionEncoder();
|
||||
verify(mainExtensionMock).newExtensionDecoder();
|
||||
verify(fallbackExtensionMock, atLeastOnce()).rsv();
|
||||
@ -107,13 +107,13 @@ public class WebSocketServerExtensionHandlerTest {
|
||||
thenReturn(null);
|
||||
|
||||
when(mainExtensionMock.rsv()).thenReturn(WebSocketExtension.RSV1);
|
||||
when(mainExtensionMock.newReponseData()).thenReturn(
|
||||
when(mainExtensionMock.newResponseData()).thenReturn(
|
||||
new WebSocketExtensionData("main", Collections.emptyMap()));
|
||||
when(mainExtensionMock.newExtensionEncoder()).thenReturn(new DummyEncoder());
|
||||
when(mainExtensionMock.newExtensionDecoder()).thenReturn(new DummyDecoder());
|
||||
|
||||
when(fallbackExtensionMock.rsv()).thenReturn(WebSocketExtension.RSV2);
|
||||
when(fallbackExtensionMock.newReponseData()).thenReturn(
|
||||
when(fallbackExtensionMock.newResponseData()).thenReturn(
|
||||
new WebSocketExtensionData("fallback", Collections.emptyMap()));
|
||||
when(fallbackExtensionMock.newExtensionEncoder()).thenReturn(new Dummy2Encoder());
|
||||
when(fallbackExtensionMock.newExtensionDecoder()).thenReturn(new Dummy2Decoder());
|
||||
@ -145,13 +145,13 @@ public class WebSocketServerExtensionHandlerTest {
|
||||
verify(mainHandshakerMock).handshakeExtension(webSocketExtensionDataMatcher("fallback"));
|
||||
verify(fallbackHandshakerMock).handshakeExtension(webSocketExtensionDataMatcher("fallback"));
|
||||
verify(mainExtensionMock, times(2)).rsv();
|
||||
verify(mainExtensionMock).newReponseData();
|
||||
verify(mainExtensionMock).newResponseData();
|
||||
verify(mainExtensionMock).newExtensionEncoder();
|
||||
verify(mainExtensionMock).newExtensionDecoder();
|
||||
|
||||
verify(fallbackExtensionMock, times(2)).rsv();
|
||||
|
||||
verify(fallbackExtensionMock).newReponseData();
|
||||
verify(fallbackExtensionMock).newResponseData();
|
||||
verify(fallbackExtensionMock).newExtensionEncoder();
|
||||
verify(fallbackExtensionMock).newExtensionDecoder();
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class PerMessageDeflateServerExtensionHandshakerTest {
|
||||
assertTrue(extension.newExtensionEncoder() instanceof PerMessageDeflateEncoder);
|
||||
|
||||
// execute
|
||||
data = extension.newReponseData();
|
||||
data = extension.newResponseData();
|
||||
|
||||
assertEquals(PERMESSAGE_DEFLATE_EXTENSION, data.name());
|
||||
assertTrue(data.parameters().isEmpty());
|
||||
@ -71,7 +71,7 @@ public class PerMessageDeflateServerExtensionHandshakerTest {
|
||||
assertTrue(extension.newExtensionEncoder() instanceof PerMessageDeflateEncoder);
|
||||
|
||||
// execute
|
||||
data = extension.newReponseData();
|
||||
data = extension.newResponseData();
|
||||
|
||||
// test
|
||||
assertEquals(PERMESSAGE_DEFLATE_EXTENSION, data.name());
|
||||
@ -117,7 +117,7 @@ public class PerMessageDeflateServerExtensionHandshakerTest {
|
||||
assertTrue(extension.newExtensionEncoder() instanceof PerMessageDeflateEncoder);
|
||||
|
||||
// execute
|
||||
data = extension.newReponseData();
|
||||
data = extension.newResponseData();
|
||||
|
||||
// test
|
||||
assertEquals(PERMESSAGE_DEFLATE_EXTENSION, data.name());
|
||||
@ -144,7 +144,7 @@ public class PerMessageDeflateServerExtensionHandshakerTest {
|
||||
assertTrue(extension.newExtensionEncoder() instanceof PerMessageDeflateEncoder);
|
||||
|
||||
// execute
|
||||
data = extension.newReponseData();
|
||||
data = extension.newResponseData();
|
||||
|
||||
// test
|
||||
assertEquals(PERMESSAGE_DEFLATE_EXTENSION, data.name());
|
||||
@ -163,7 +163,7 @@ public class PerMessageDeflateServerExtensionHandshakerTest {
|
||||
assertNotNull(extension);
|
||||
|
||||
// execute
|
||||
data = extension.newReponseData();
|
||||
data = extension.newResponseData();
|
||||
|
||||
// test
|
||||
assertEquals(PERMESSAGE_DEFLATE_EXTENSION, data.name());
|
||||
|
Loading…
Reference in New Issue
Block a user