SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.3

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
106 43 0 0

Files

Class Bugs
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.AbstractMySQLBinlogEventPacket 1
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.management.MySQLBinlogFormatDescriptionEventPacket 3
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogRowsEventPacket 4
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogTableMapEventPacket 2
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.column.value.string.MySQLBinaryString 2
org.apache.shardingsphere.database.protocol.mysql.packet.command.binlog.MySQLComRegisterSlaveCommandPacket 1
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.MySQLComStmtSendLongDataPacket 1
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLComStmtExecutePacket 4
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLNullBitmap 1
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.prepare.MySQLComStmtPreparePacket 1
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.text.MySQLTextResultSetRowPacket 2
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.text.query.MySQLComQueryPacket 1
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthMoreDataPacket 2
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchRequestPacket 2
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchResponsePacket 2
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthenticationPluginData 4
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakePacket 3
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet 5
org.apache.shardingsphere.database.protocol.mysql.payload.MySQLPacketPayload 2

org.apache.shardingsphere.database.protocol.mysql.packet.binlog.AbstractMySQLBinlogEventPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.AbstractMySQLBinlogEventPacket.getBinlogEventHeader() may expose internal representation by returning AbstractMySQLBinlogEventPacket.binlogEventHeader MALICIOUS_CODE EI_EXPOSE_REP 33 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.binlog.management.MySQLBinlogFormatDescriptionEventPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.management.MySQLBinlogFormatDescriptionEventPacket.getMysqlServerVersion() may expose internal representation by returning MySQLBinlogFormatDescriptionEventPacket.mysqlServerVersion MALICIOUS_CODE EI_EXPOSE_REP 40 Medium
Unread field: org.apache.shardingsphere.database.protocol.mysql.packet.binlog.management.MySQLBinlogFormatDescriptionEventPacket.binlogVersion; should this field be static? PERFORMANCE SS_SHOULD_BE_STATIC 38 Medium
Unread field: org.apache.shardingsphere.database.protocol.mysql.packet.binlog.management.MySQLBinlogFormatDescriptionEventPacket.eventHeaderLength; should this field be static? PERFORMANCE SS_SHOULD_BE_STATIC 44 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogRowsEventPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogRowsEventPacket.getColumnsPresentBitmap() may expose internal representation by returning MySQLBinlogRowsEventPacket.columnsPresentBitmap MALICIOUS_CODE EI_EXPOSE_REP 48 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogRowsEventPacket.getColumnsPresentBitmap2() may expose internal representation by returning MySQLBinlogRowsEventPacket.columnsPresentBitmap2 MALICIOUS_CODE EI_EXPOSE_REP 50 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogRowsEventPacket.getRows() may expose internal representation by returning MySQLBinlogRowsEventPacket.rows MALICIOUS_CODE EI_EXPOSE_REP 52 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogRowsEventPacket.getRows2() may expose internal representation by returning MySQLBinlogRowsEventPacket.rows2 MALICIOUS_CODE EI_EXPOSE_REP 54 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogTableMapEventPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogTableMapEventPacket.getColumnDefs() may expose internal representation by returning MySQLBinlogTableMapEventPacket.columnDefs MALICIOUS_CODE EI_EXPOSE_REP 49 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.MySQLBinlogTableMapEventPacket.getNullBitMap() may expose internal representation by returning MySQLBinlogTableMapEventPacket.nullBitMap MALICIOUS_CODE EI_EXPOSE_REP 51 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.column.value.string.MySQLBinaryString

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.column.value.string.MySQLBinaryString.getBytes() may expose internal representation by returning MySQLBinaryString.bytes MALICIOUS_CODE EI_EXPOSE_REP 40 Medium
new org.apache.shardingsphere.database.protocol.mysql.packet.binlog.row.column.value.string.MySQLBinaryString(byte[]) may expose internal representation by storing an externally mutable object into MySQLBinaryString.bytes MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.command.binlog.MySQLComRegisterSlaveCommandPacket

Bug Category Details Line Priority
Found reliance on default encoding in org.apache.shardingsphere.database.protocol.mysql.packet.command.binlog.MySQLComRegisterSlaveCommandPacket.doWrite(MySQLPacketPayload): String.getBytes() I18N DM_DEFAULT_ENCODING 67 High

org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.MySQLComStmtSendLongDataPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.MySQLComStmtSendLongDataPacket.getData() may expose internal representation by returning MySQLComStmtSendLongDataPacket.data MALICIOUS_CODE EI_EXPOSE_REP 35 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLComStmtExecutePacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLComStmtExecutePacket.getNewParameterTypes() may expose internal representation by returning MySQLComStmtExecutePacket.newParameterTypes MALICIOUS_CODE EI_EXPOSE_REP 63 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLComStmtExecutePacket.getNullBitmap() may expose internal representation by returning MySQLComStmtExecutePacket.nullBitmap MALICIOUS_CODE EI_EXPOSE_REP 59 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLComStmtExecutePacket.getPayload() may expose internal representation by returning MySQLComStmtExecutePacket.payload MALICIOUS_CODE EI_EXPOSE_REP 53 Medium
new org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLComStmtExecutePacket(MySQLPacketPayload, int) may expose internal representation by storing an externally mutable object into MySQLComStmtExecutePacket.payload MALICIOUS_CODE EI_EXPOSE_REP2 67 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLNullBitmap

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.execute.MySQLNullBitmap.getNullBitmap() may expose internal representation by returning MySQLNullBitmap.nullBitmap MALICIOUS_CODE EI_EXPOSE_REP 32 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.prepare.MySQLComStmtPreparePacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.binary.prepare.MySQLComStmtPreparePacket.getHintValueContext() may expose internal representation by returning MySQLComStmtPreparePacket.hintValueContext MALICIOUS_CODE EI_EXPOSE_REP 37 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.command.query.text.MySQLTextResultSetRowPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.text.MySQLTextResultSetRowPacket.getData() may expose internal representation by returning MySQLTextResultSetRowPacket.data MALICIOUS_CODE EI_EXPOSE_REP 54 Medium
new org.apache.shardingsphere.database.protocol.mysql.packet.command.query.text.MySQLTextResultSetRowPacket(Collection) may expose internal representation by storing an externally mutable object into MySQLTextResultSetRowPacket.data MALICIOUS_CODE EI_EXPOSE_REP2 48 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.command.query.text.query.MySQLComQueryPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.command.query.text.query.MySQLComQueryPacket.getHintValueContext() may expose internal representation by returning MySQLComQueryPacket.hintValueContext MALICIOUS_CODE EI_EXPOSE_REP 41 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthMoreDataPacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthMoreDataPacket.getPluginData() may expose internal representation by returning MySQLAuthMoreDataPacket.pluginData MALICIOUS_CODE EI_EXPOSE_REP 41 Medium
new org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthMoreDataPacket(byte[]) may expose internal representation by storing an externally mutable object into MySQLAuthMoreDataPacket.pluginData MALICIOUS_CODE EI_EXPOSE_REP2 32 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchRequestPacket

Bug Category Details Line Priority
Found reliance on default encoding in new org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchRequestPacket(MySQLPacketPayload): String.getBytes() I18N DM_DEFAULT_ENCODING 50 High
Found reliance on default encoding in org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchRequestPacket.write(MySQLPacketPayload): new String(byte[]) I18N DM_DEFAULT_ENCODING 57 High

org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchResponsePacket

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchResponsePacket.getAuthPluginResponse() may expose internal representation by returning MySQLAuthSwitchResponsePacket.authPluginResponse MALICIOUS_CODE EI_EXPOSE_REP 34 Medium
new org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthSwitchResponsePacket(byte[]) may expose internal representation by storing an externally mutable object into MySQLAuthSwitchResponsePacket.authPluginResponse MALICIOUS_CODE EI_EXPOSE_REP2 30 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthenticationPluginData

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthenticationPluginData.getAuthenticationPluginDataPart1() may expose internal representation by returning MySQLAuthenticationPluginData.authenticationPluginDataPart1 MALICIOUS_CODE EI_EXPOSE_REP 36 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthenticationPluginData.getAuthenticationPluginDataPart2() may expose internal representation by returning MySQLAuthenticationPluginData.authenticationPluginDataPart2 MALICIOUS_CODE EI_EXPOSE_REP 38 Medium
new org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthenticationPluginData(byte[], byte[]) may expose internal representation by storing an externally mutable object into MySQLAuthenticationPluginData.authenticationPluginDataPart1 MALICIOUS_CODE EI_EXPOSE_REP2 32 Medium
new org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLAuthenticationPluginData(byte[], byte[]) may expose internal representation by storing an externally mutable object into MySQLAuthenticationPluginData.authenticationPluginDataPart2 MALICIOUS_CODE EI_EXPOSE_REP2 32 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakePacket

Bug Category Details Line Priority
Found reliance on default encoding in org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakePacket.write(MySQLPacketPayload): new String(byte[]) I18N DM_DEFAULT_ENCODING 117 High
Found reliance on default encoding in org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakePacket.writeAuthPluginDataPart2(MySQLPacketPayload): new String(byte[]) I18N DM_DEFAULT_ENCODING 130 High
Unread field: org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakePacket.protocolVersion; should this field be static? PERFORMANCE SS_SHOULD_BE_STATIC 40 Medium

org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet

Bug Category Details Line Priority
Found reliance on default encoding in org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet.writeAuthResponse(MySQLPacketPayload): new String(byte[]) I18N DM_DEFAULT_ENCODING 176 High
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet.getAuthResponse() may expose internal representation by returning MySQLHandshakeResponse41Packet.authResponse MALICIOUS_CODE EI_EXPOSE_REP 48 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet.getConnectionAttributes() may expose internal representation by returning MySQLHandshakeResponse41Packet.connectionAttributes MALICIOUS_CODE EI_EXPOSE_REP 58 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet.setAuthResponse(byte[]) may expose internal representation by storing an externally mutable object into MySQLHandshakeResponse41Packet.authResponse MALICIOUS_CODE EI_EXPOSE_REP2 39 Medium
org.apache.shardingsphere.database.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet.setConnectionAttributes(Map) may expose internal representation by storing an externally mutable object into MySQLHandshakeResponse41Packet.connectionAttributes MALICIOUS_CODE EI_EXPOSE_REP2 39 Medium

org.apache.shardingsphere.database.protocol.mysql.payload.MySQLPacketPayload

Bug Category Details Line Priority
org.apache.shardingsphere.database.protocol.mysql.payload.MySQLPacketPayload.getByteBuf() may expose internal representation by returning MySQLPacketPayload.byteBuf MALICIOUS_CODE EI_EXPOSE_REP 37 Medium
new org.apache.shardingsphere.database.protocol.mysql.payload.MySQLPacketPayload(ByteBuf, Charset) may expose internal representation by storing an externally mutable object into MySQLPacketPayload.byteBuf MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium