tuohai666 commented on a change in pull request #3034: Optimize performance, reduce unnecessary loops URL: https://github.com/apache/incubator-shardingsphere/pull/3034#discussion_r324560696
########## File path: sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/packet/command/MySQLCommandPacketType.java ########## @@ -253,6 +256,17 @@ * @see <a href="https://dev.mysql.com/doc/internals/en/com-reset-connection.html">COM_RESET_CONNECTION</a> */ COM_RESET_CONNECTION(0x1f); + + /** + * The cache map for MySQLCommandPacketType. + */ + private static final Map<Integer, MySQLCommandPacketType> MYSQL_COMMAND_PACKET_TYPE_CACHE = new HashMap<Integer, MySQLCommandPacketType>() { Review comment: @yanickxia You are right. Effectively <> turns off the type checking, rather than providing type inference. An anonymous class stores the actual generic type and so you have to provide it. @yanyzy I'm afraid you have to recover the line 263 to origin, you had already made it perfect. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services