Update netty-build to the latest version
From this commit, checkstyle considers an unnecessary empty line as a violation.
This commit is contained in:
parent
85c570505b
commit
9c0b2ad75c
@ -101,7 +101,6 @@ public class FileServer {
|
||||
ctx.write(file + " " + file.length() + "\n");
|
||||
ctx.sendFile(new DefaultFileRegion(new FileInputStream(file).getChannel(), 0, file.length()));
|
||||
ctx.write("\n");
|
||||
|
||||
} else {
|
||||
ctx.write("File not found: " + file + "\n");
|
||||
}
|
||||
|
2
pom.xml
2
pom.xml
@ -330,7 +330,7 @@
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-build</artifactId>
|
||||
<version>12</version>
|
||||
<version>13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
@ -393,8 +393,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
return strVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected abstract class AbstractUnsafe implements Unsafe {
|
||||
|
||||
private final class FlushTask {
|
||||
@ -446,11 +444,9 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
// nothing pending try to send the fileRegion now!
|
||||
sendFile0(region, future);
|
||||
}
|
||||
|
||||
} else {
|
||||
eventLoop().execute(new Runnable() {
|
||||
@Override
|
||||
@ -736,7 +732,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
return;
|
||||
}
|
||||
flushNotifierAndFlush(future);
|
||||
|
||||
} else {
|
||||
eventLoop().execute(new Runnable() {
|
||||
@Override
|
||||
|
@ -278,6 +278,5 @@ public interface Channel extends AttributeMap, ChannelOutboundInvoker, ChannelPr
|
||||
void resumeRead();
|
||||
|
||||
void sendFile(FileRegion region, ChannelFuture future);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -565,7 +565,6 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
|
||||
@Override
|
||||
public void completed(Integer result, Object attachment) {
|
||||
try {
|
||||
|
||||
if (result == 0) {
|
||||
javaChannel().write(src, null, this);
|
||||
return;
|
||||
|
@ -109,7 +109,6 @@ abstract class AbstractNioByteChannel extends AbstractNioChannel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void doFlushByteBuffer(ByteBuf buf) throws Exception {
|
||||
if (!buf.readable()) {
|
||||
@ -131,7 +130,6 @@ abstract class AbstractNioByteChannel extends AbstractNioChannel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void doFlushFileRegion(final FileRegion region, final ChannelFuture future) throws Exception {
|
||||
if (javaChannel() instanceof WritableByteChannel) {
|
||||
|
@ -128,7 +128,6 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void executeWhenWritable(AbstractNioChannel channel, NioTask<? extends SelectableChannel> task) {
|
||||
if (channel == null) {
|
||||
throw new NullPointerException("channel");
|
||||
@ -141,7 +140,6 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
||||
SelectionKey key = channel.selectionKey();
|
||||
channel.writableTasks.offer((NioTask<SelectableChannel>) task);
|
||||
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
|
||||
|
||||
}
|
||||
|
||||
// Create a new selector and "transfer" all channels from the old
|
||||
|
@ -253,6 +253,5 @@ public class OioSocketChannel extends AbstractOioByteChannel
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user