Reformat code to use the official kotlin code style
This commit is contained in:
parent
da7397e7f2
commit
0a4f835327
47 changed files with 199 additions and 153 deletions
|
@ -4,7 +4,7 @@ import io.netty.buffer.ByteBuf
|
|||
import io.netty.channel.ChannelHandlerContext
|
||||
import io.netty.handler.codec.ByteToMessageCodec
|
||||
|
||||
class FramingCodec: ByteToMessageCodec<ByteBuf>() {
|
||||
class FramingCodec : ByteToMessageCodec<ByteBuf>() {
|
||||
private var currentLength: Int? = null
|
||||
|
||||
override fun encode(ctx: ChannelHandlerContext, msg: ByteBuf, out: ByteBuf) {
|
||||
|
@ -21,8 +21,7 @@ class FramingCodec: ByteToMessageCodec<ByteBuf>() {
|
|||
if (msg.varIntReadable()) {
|
||||
length = msg.readVarInt()
|
||||
currentLength = length
|
||||
}
|
||||
else return
|
||||
} else return
|
||||
}
|
||||
|
||||
if (msg.readableBytes() >= length) {
|
||||
|
|
Reference in a new issue