mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -161,7 +161,7 @@ public class AioServer implements Closeable {
|
||||
public void close() {
|
||||
IoUtil.closeQuietly(this.channel);
|
||||
|
||||
if (null != this.group && ! this.group.isShutdown()) {
|
||||
if (null != this.group && !this.group.isShutdown()) {
|
||||
try {
|
||||
this.group.shutdownNow();
|
||||
} catch (final IOException e) {
|
||||
|
@@ -80,7 +80,7 @@ public class NioClient implements Closeable {
|
||||
|
||||
// 等待建立连接
|
||||
//noinspection StatementWithEmptyBody
|
||||
while (! channel.finishConnect()){}
|
||||
while (!channel.finishConnect()){}
|
||||
} catch (final IOException e) {
|
||||
close();
|
||||
throw new IORuntimeException(e);
|
||||
|
@@ -25,7 +25,7 @@ public class AioServerTest {
|
||||
public void doAction(final AioSession session, final ByteBuffer data) {
|
||||
Console.log(data);
|
||||
|
||||
if(! data.hasRemaining()) {
|
||||
if(!data.hasRemaining()) {
|
||||
final StringBuilder response = StrUtil.builder()//
|
||||
.append("HTTP/1.1 200 OK\r\n")//
|
||||
.append("Date: ").append(DateUtil.formatHttpDate(DateUtil.now())).append("\r\n")//
|
||||
|
Reference in New Issue
Block a user