Remove useless imports and redundant type cast (#11639)

Motivation:

There are some redundant imports and unnecessary type cast

Modification:

Remove useless imports and unnecessary type cast

Result:

The code is cleaner than original

Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
This commit is contained in:
skyguard1 2021-09-03 01:14:00 +08:00 committed by Norman Maurer
parent 6a2b9a76fe
commit 6339b240d4
3 changed files with 1 additions and 3 deletions

View File

@ -82,7 +82,7 @@ public final class MqttMessageFactory {
case AUTH: case AUTH:
//Having MqttReasonCodeAndPropertiesVariableHeader //Having MqttReasonCodeAndPropertiesVariableHeader
return new MqttMessage(mqttFixedHeader, return new MqttMessage(mqttFixedHeader,
(MqttReasonCodeAndPropertiesVariableHeader) variableHeader); variableHeader);
default: default:
throw new IllegalArgumentException("unknown message type: " + mqttFixedHeader.messageType()); throw new IllegalArgumentException("unknown message type: " + mqttFixedHeader.messageType());

View File

@ -56,7 +56,6 @@ import java.security.cert.CertificateNotYetValidException;
import java.security.cert.CertificateRevokedException; import java.security.cert.CertificateRevokedException;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;

View File

@ -17,7 +17,6 @@ package io.netty.channel.epoll;
import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.Bootstrap;
import io.netty.bootstrap.ServerBootstrap; import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelOption;
import io.netty.testsuite.transport.TestsuitePermutation; import io.netty.testsuite.transport.TestsuitePermutation;
import io.netty.testsuite.transport.socket.SocketConnectTest; import io.netty.testsuite.transport.socket.SocketConnectTest;