diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtension.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtension.java index 60f16eb3c8..6f887ad12d 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtension.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtension.java @@ -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(); } diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandler.java index 0b7f9adf83..27820fc5d4 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandler.java @@ -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()); } diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/DeflateFrameServerExtensionHandshaker.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/DeflateFrameServerExtensionHandshaker.java index 0d85a15980..e45f7bdbf4 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/DeflateFrameServerExtensionHandshaker.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/DeflateFrameServerExtensionHandshaker.java @@ -95,7 +95,7 @@ public final class DeflateFrameServerExtensionHandshaker implements WebSocketSer } @Override - public WebSocketExtensionData newReponseData() { + public WebSocketExtensionData newResponseData() { return new WebSocketExtensionData(extensionName, Collections.emptyMap()); } } diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshaker.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshaker.java index 8da951bcf2..a79084ee13 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshaker.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshaker.java @@ -176,7 +176,7 @@ public final class PerMessageDeflateServerExtensionHandshaker implements WebSock } @Override - public WebSocketExtensionData newReponseData() { + public WebSocketExtensionData newResponseData() { HashMap parameters = new HashMap<>(4); if (serverNoContext) { parameters.put(SERVER_NO_CONTEXT, null); diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandlerTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandlerTest.java index e0af07a908..fd2821e907 100644 --- a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandlerTest.java +++ b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandlerTest.java @@ -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(); } diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshakerTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshakerTest.java index bdc854f4ca..4c55c28286 100644 --- a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshakerTest.java +++ b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateServerExtensionHandshakerTest.java @@ -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());