Skip to content

Commit 6f26324

Browse files
committed
Merge pull request #451 from NiteshKant/0.4.x
Upgrade netty to 4.1.0.Beta8
2 parents 2dbf699 + 84b54d9 commit 6f26324

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
netty_version=4.1.0.Beta7
16+
netty_version=4.1.0.Beta8
1717
slf4j_version=1.7.6

rxnetty/src/main/java/io/reactivex/netty/protocol/http/sse/ServerSentEventDecoder.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
package io.reactivex.netty.protocol.http.sse;
1717

1818
import io.netty.buffer.ByteBuf;
19-
import io.netty.buffer.ByteBufProcessor;
2019
import io.netty.channel.ChannelHandlerContext;
2120
import io.netty.handler.codec.ByteToMessageDecoder;
21+
import io.netty.util.ByteProcessor;
2222
import org.slf4j.Logger;
2323
import org.slf4j.LoggerFactory;
2424

@@ -38,36 +38,36 @@ public class ServerSentEventDecoder extends ByteToMessageDecoder {
3838
private static final char[] DATA_FIELD_NAME = "data".toCharArray();
3939
private static final char[] ID_FIELD_NAME = "id".toCharArray();
4040

41-
protected static final ByteBufProcessor SKIP_TILL_LINE_DELIMITER_PROCESSOR = new ByteBufProcessor() {
41+
protected static final ByteProcessor SKIP_TILL_LINE_DELIMITER_PROCESSOR = new ByteProcessor() {
4242
@Override
4343
public boolean process(byte value) throws Exception {
4444
return !isLineDelimiter((char) value);
4545
}
4646
};
4747

48-
protected static final ByteBufProcessor SKIP_LINE_DELIMITERS_AND_SPACES_PROCESSOR = new ByteBufProcessor() {
48+
protected static final ByteProcessor SKIP_LINE_DELIMITERS_AND_SPACES_PROCESSOR = new ByteProcessor() {
4949
@Override
5050
public boolean process(byte value) throws Exception {
5151
return isLineDelimiter((char) value) || (char) value == ' ';
5252
}
5353
};
5454

55-
protected static final ByteBufProcessor SKIP_COLON_AND_WHITE_SPACE_PROCESSOR = new ByteBufProcessor() {
55+
protected static final ByteProcessor SKIP_COLON_AND_WHITE_SPACE_PROCESSOR = new ByteProcessor() {
5656
@Override
5757
public boolean process(byte value) throws Exception {
5858
char valueChar = (char) value;
5959
return valueChar == ':' || valueChar == ' ';
6060
}
6161
};
6262

63-
protected static final ByteBufProcessor SCAN_COLON_PROCESSOR = new ByteBufProcessor() {
63+
protected static final ByteProcessor SCAN_COLON_PROCESSOR = new ByteProcessor() {
6464
@Override
6565
public boolean process(byte value) throws Exception {
6666
return (char) value != ':';
6767
}
6868
};
6969

70-
protected static final ByteBufProcessor SCAN_EOL_PROCESSOR = new ByteBufProcessor() {
70+
protected static final ByteProcessor SCAN_EOL_PROCESSOR = new ByteProcessor() {
7171
@Override
7272
public boolean process(byte value) throws Exception {
7373
return !isLineDelimiter((char) value);
@@ -340,7 +340,7 @@ private static boolean skipTillEOL(ByteBuf in) {
340340
return skipTillMatching(in, SKIP_TILL_LINE_DELIMITER_PROCESSOR);
341341
}
342342

343-
protected static boolean skipTillMatching(ByteBuf byteBuf, ByteBufProcessor processor) {
343+
protected static boolean skipTillMatching(ByteBuf byteBuf, ByteProcessor processor) {
344344
final int lastIndexProcessed = byteBuf.forEachByte(processor);
345345
if (-1 == lastIndexProcessed) {
346346
byteBuf.readerIndex(byteBuf.readerIndex() + byteBuf.readableBytes()); // If all the remaining bytes are to be ignored, discard the buffer.

rxnetty/src/main/java/io/reactivex/netty/protocol/http/sse/ServerSentEventEncoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
package io.reactivex.netty.protocol.http.sse;
1717

1818
import io.netty.buffer.ByteBuf;
19-
import io.netty.buffer.ByteBufProcessor;
2019
import io.netty.channel.ChannelHandler;
2120
import io.netty.channel.ChannelHandlerContext;
2221
import io.netty.handler.codec.MessageToByteEncoder;
22+
import io.netty.util.ByteProcessor;
2323

2424
/**
2525
* An encoder to convert {@link ServerSentEvent} to a {@link io.netty.buffer.ByteBuf}
@@ -67,7 +67,7 @@ protected void encode(ChannelHandlerContext ctx, ServerSentEvent serverSentEvent
6767
if (splitSseData) {
6868
while (content.isReadable()) { // Scan the buffer and split on new line into multiple data lines.
6969
final int readerIndexAtStart = content.readerIndex();
70-
int newLineIndex = content.forEachByte(new ByteBufProcessor() {
70+
int newLineIndex = content.forEachByte(new ByteProcessor() {
7171
@Override
7272
public boolean process(byte value) throws Exception {
7373
return (char) value != '\n';

0 commit comments

Comments
 (0)