From 4a23c2a6eb5004d21dc5e3f09a32e66ade528c92 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 7 Jun 2012 22:01:59 +0900 Subject: [PATCH] Fix checkstyle errors --- .../netty/handler/codec/http/HttpServerCodec.java | 2 -- .../netty/handler/codec/spdy/SpdyFrameCodec.java | 2 -- .../handler/logging/MessageLoggingHandler.java | 15 +++++++++++++++ .../handler/logging/StreamLoggingHandler.java | 15 +++++++++++++++ .../java/io/netty/channel/ChannelHandlerType.java | 15 +++++++++++++++ .../io/netty/channel/ChannelOperationHandler.java | 15 +++++++++++++++ .../channel/ChannelOperationHandlerAdapter.java | 15 +++++++++++++++ .../io/netty/channel/ChannelStateHandler.java | 15 +++++++++++++++ .../netty/channel/ChannelStateHandlerAdapter.java | 2 +- .../io/netty/channel/DefaultChannelPipeline.java | 4 +++- .../channel/embedded/EmbeddedMessageChannel.java | 15 +++++++++++++++ .../channel/embedded/EmbeddedStreamChannel.java | 15 +++++++++++++++ 12 files changed, 124 insertions(+), 6 deletions(-) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerCodec.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerCodec.java index a930cc172a..c010644937 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerCodec.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerCodec.java @@ -17,8 +17,6 @@ package io.netty.handler.codec.http; import io.netty.channel.CombinedChannelHandler; -import io.netty.channel.CombinedChannelHandler; - /** * A combination of {@link HttpRequestDecoder} and {@link HttpResponseEncoder} diff --git a/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyFrameCodec.java b/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyFrameCodec.java index 12be388a53..28943b3625 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyFrameCodec.java +++ b/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyFrameCodec.java @@ -17,8 +17,6 @@ package io.netty.handler.codec.spdy; import io.netty.channel.CombinedChannelHandler; -import io.netty.channel.CombinedChannelHandler; - /** * A combination of {@link SpdyFrameDecoder} and {@link SpdyFrameEncoder}. diff --git a/handler/src/main/java/io/netty/handler/logging/MessageLoggingHandler.java b/handler/src/main/java/io/netty/handler/logging/MessageLoggingHandler.java index 68173597c0..014ea2036d 100644 --- a/handler/src/main/java/io/netty/handler/logging/MessageLoggingHandler.java +++ b/handler/src/main/java/io/netty/handler/logging/MessageLoggingHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.handler.logging; import io.netty.channel.ChannelBufferHolder; diff --git a/handler/src/main/java/io/netty/handler/logging/StreamLoggingHandler.java b/handler/src/main/java/io/netty/handler/logging/StreamLoggingHandler.java index 6391a54a68..30df2f0cfc 100644 --- a/handler/src/main/java/io/netty/handler/logging/StreamLoggingHandler.java +++ b/handler/src/main/java/io/netty/handler/logging/StreamLoggingHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.handler.logging; import io.netty.buffer.ChannelBuffer; diff --git a/transport/src/main/java/io/netty/channel/ChannelHandlerType.java b/transport/src/main/java/io/netty/channel/ChannelHandlerType.java index 24e21e0e48..18ac725ec0 100644 --- a/transport/src/main/java/io/netty/channel/ChannelHandlerType.java +++ b/transport/src/main/java/io/netty/channel/ChannelHandlerType.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.channel; public enum ChannelHandlerType { diff --git a/transport/src/main/java/io/netty/channel/ChannelOperationHandler.java b/transport/src/main/java/io/netty/channel/ChannelOperationHandler.java index 605611f8b6..8ea4a9e80d 100644 --- a/transport/src/main/java/io/netty/channel/ChannelOperationHandler.java +++ b/transport/src/main/java/io/netty/channel/ChannelOperationHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.channel; import java.net.SocketAddress; diff --git a/transport/src/main/java/io/netty/channel/ChannelOperationHandlerAdapter.java b/transport/src/main/java/io/netty/channel/ChannelOperationHandlerAdapter.java index e3dd918b7d..ef663795e3 100644 --- a/transport/src/main/java/io/netty/channel/ChannelOperationHandlerAdapter.java +++ b/transport/src/main/java/io/netty/channel/ChannelOperationHandlerAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.channel; import java.net.SocketAddress; diff --git a/transport/src/main/java/io/netty/channel/ChannelStateHandler.java b/transport/src/main/java/io/netty/channel/ChannelStateHandler.java index 1d03b3a8cf..d9d1823e11 100644 --- a/transport/src/main/java/io/netty/channel/ChannelStateHandler.java +++ b/transport/src/main/java/io/netty/channel/ChannelStateHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.channel; public interface ChannelStateHandler extends ChannelHandler { diff --git a/transport/src/main/java/io/netty/channel/ChannelStateHandlerAdapter.java b/transport/src/main/java/io/netty/channel/ChannelStateHandlerAdapter.java index 9646bcde7f..34afe90eaa 100644 --- a/transport/src/main/java/io/netty/channel/ChannelStateHandlerAdapter.java +++ b/transport/src/main/java/io/netty/channel/ChannelStateHandlerAdapter.java @@ -96,7 +96,7 @@ public class ChannelStateHandlerAdapter implements ChannelStateHandler { } nextIn.add(msg); } - } else if (ctx.hasInboundByteBuffer()){ + } else if (ctx.hasInboundByteBuffer()) { ChannelBuffer in = ctx.inboundByteBuffer(); ChannelBuffer nextIn = ctx.nextInboundByteBuffer(); nextIn.writeBytes(in); diff --git a/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java b/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java index a55d8e9a5f..9446312e3a 100644 --- a/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java +++ b/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java @@ -1474,7 +1474,9 @@ public class DefaultChannelPipeline implements ChannelPipeline { msgBuf = true; executor = ctx.executor(); break; - } if (message instanceof ChannelBuffer && ctx.hasOutboundByteBuffer()) { + } + + if (message instanceof ChannelBuffer && ctx.hasOutboundByteBuffer()) { executor = ctx.executor(); break; } diff --git a/transport/src/main/java/io/netty/channel/embedded/EmbeddedMessageChannel.java b/transport/src/main/java/io/netty/channel/embedded/EmbeddedMessageChannel.java index 6bfeee135d..45254500cc 100644 --- a/transport/src/main/java/io/netty/channel/embedded/EmbeddedMessageChannel.java +++ b/transport/src/main/java/io/netty/channel/embedded/EmbeddedMessageChannel.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.channel.embedded; import io.netty.channel.ChannelHandler; diff --git a/transport/src/main/java/io/netty/channel/embedded/EmbeddedStreamChannel.java b/transport/src/main/java/io/netty/channel/embedded/EmbeddedStreamChannel.java index 40f94d3b00..e3b5ecb5c9 100644 --- a/transport/src/main/java/io/netty/channel/embedded/EmbeddedStreamChannel.java +++ b/transport/src/main/java/io/netty/channel/embedded/EmbeddedStreamChannel.java @@ -1,3 +1,18 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package io.netty.channel.embedded; import io.netty.buffer.ChannelBuffer;