SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.9.3

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
70 39 0 0

Files

Class Bugs
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup 2
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext 2
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext 4
org.apache.shardingsphere.infra.executor.sql.context.SQLUnit 4
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit 2
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor 1
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback 1
org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawExecutor 1
org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawSQLRuntimeContext 2
org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult 2
org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.raw.metadata.RawQueryResultMetaData 1
org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.AbstractMemoryQueryResult 1
org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.row.MemoryQueryResultDataRow 2
org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine 1
org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.StatementOption 1
org.apache.shardingsphere.infra.executor.sql.process.Process 9
org.apache.shardingsphere.infra.executor.sql.process.ProcessRegistry 1
org.apache.shardingsphere.infra.executor.sql.process.yaml.YamlProcessList 2

org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup.getInputs() may expose internal representation by returning ExecutionGroup.inputs MALICIOUS_CODE EI_EXPOSE_REP 34 Medium
new org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup(List) may expose internal representation by storing an externally mutable object into ExecutionGroup.inputs MALICIOUS_CODE EI_EXPOSE_REP2 30 Medium

org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext.getInputGroups() may expose internal representation by returning ExecutionGroupContext.inputGroups MALICIOUS_CODE EI_EXPOSE_REP 34 Medium
new org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext(Collection, ExecutionGroupReportContext) may expose internal representation by storing an externally mutable object into ExecutionGroupContext.inputGroups MALICIOUS_CODE EI_EXPOSE_REP2 30 Medium

org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext.getExecutionUnits() may expose internal representation by returning ExecutionContext.executionUnits MALICIOUS_CODE EI_EXPOSE_REP 37 Medium
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext.getRouteContext() may expose internal representation by returning ExecutionContext.routeContext MALICIOUS_CODE EI_EXPOSE_REP 39 Medium
new org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext(QueryContext, Collection, RouteContext) may expose internal representation by storing an externally mutable object into ExecutionContext.executionUnits MALICIOUS_CODE EI_EXPOSE_REP2 31 Medium
new org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext(QueryContext, Collection, RouteContext) may expose internal representation by storing an externally mutable object into ExecutionContext.routeContext MALICIOUS_CODE EI_EXPOSE_REP2 31 Medium

org.apache.shardingsphere.infra.executor.sql.context.SQLUnit

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.context.SQLUnit.getParameters() may expose internal representation by returning SQLUnit.parameters MALICIOUS_CODE EI_EXPOSE_REP 40 Medium
org.apache.shardingsphere.infra.executor.sql.context.SQLUnit.getTableRouteMappers() may expose internal representation by returning SQLUnit.tableRouteMappers MALICIOUS_CODE EI_EXPOSE_REP 42 Medium
new org.apache.shardingsphere.infra.executor.sql.context.SQLUnit(String, List, List) may expose internal representation by storing an externally mutable object into SQLUnit.parameters MALICIOUS_CODE EI_EXPOSE_REP2 32 Medium
new org.apache.shardingsphere.infra.executor.sql.context.SQLUnit(String, List, List) may expose internal representation by storing an externally mutable object into SQLUnit.tableRouteMappers MALICIOUS_CODE EI_EXPOSE_REP2 32 Medium

org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit.getStorageResource() may expose internal representation by returning JDBCExecutionUnit.storageResource MALICIOUS_CODE EI_EXPOSE_REP 39 Medium
new org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit(ExecutionUnit, ConnectionMode, Statement) may expose internal representation by storing an externally mutable object into JDBCExecutionUnit.storageResource MALICIOUS_CODE EI_EXPOSE_REP2 31 Medium

org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor

Bug Category Details Line Priority
new org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor(ExecutorEngine, ConnectionContext) may expose internal representation by storing an externally mutable object into JDBCExecutor.connectionContext MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium

org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback

Bug Category Details Line Priority
new org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback(DatabaseType, ResourceMetaData, SQLStatement, boolean) may expose internal representation by storing an externally mutable object into JDBCExecutorCallback.sqlStatement MALICIOUS_CODE EI_EXPOSE_REP2 47 Medium

org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawExecutor

Bug Category Details Line Priority
new org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawExecutor(ExecutorEngine, ConnectionContext) may expose internal representation by storing an externally mutable object into RawExecutor.connectionContext MALICIOUS_CODE EI_EXPOSE_REP2 38 Medium

org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawSQLRuntimeContext

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawSQLRuntimeContext.getDatabase() may expose internal representation by returning RawSQLRuntimeContext.database MALICIOUS_CODE EI_EXPOSE_REP 36 Medium
new org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawSQLRuntimeContext(String, ShardingSphereDatabase, RawGroup, boolean) may expose internal representation by storing an externally mutable object into RawSQLRuntimeContext.database MALICIOUS_CODE EI_EXPOSE_REP2 29 Medium

org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult.getResultSet() may expose internal representation by returning JDBCStreamQueryResult.resultSet MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
new org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult(ResultSet, boolean) may expose internal representation by storing an externally mutable object into JDBCStreamQueryResult.resultSet MALICIOUS_CODE EI_EXPOSE_REP2 57 Medium

org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.raw.metadata.RawQueryResultMetaData

Bug Category Details Line Priority
new org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.raw.metadata.RawQueryResultMetaData(List) may expose internal representation by storing an externally mutable object into RawQueryResultMetaData.columns MALICIOUS_CODE EI_EXPOSE_REP2 28 Medium

org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.AbstractMemoryQueryResult

Bug Category Details Line Priority
Found reliance on default encoding in org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.AbstractMemoryQueryResult.getCharacterStream(int): new java.io.InputStreamReader(InputStream) I18N DM_DEFAULT_ENCODING 108 High

org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.row.MemoryQueryResultDataRow

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.row.MemoryQueryResultDataRow.getValue() may expose internal representation by returning MemoryQueryResultDataRow.value MALICIOUS_CODE EI_EXPOSE_REP 32 Medium
new org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.row.MemoryQueryResultDataRow(List) may expose internal representation by storing an externally mutable object into MemoryQueryResultDataRow.value MALICIOUS_CODE EI_EXPOSE_REP2 28 Medium

org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine

Bug Category Details Line Priority
new org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine(String, int, DatabaseConnectionManager, ExecutorStatementManager, StorageResourceOption, Collection, ShardingSphereMetaData) may expose internal representation by storing an externally mutable object into DriverExecutionPrepareEngine.metaData MALICIOUS_CODE EI_EXPOSE_REP2 77 Medium

org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.StatementOption

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.StatementOption.getColumns() may expose internal representation by returning StatementOption.columns MALICIOUS_CODE EI_EXPOSE_REP 42 Medium

org.apache.shardingsphere.infra.executor.sql.process.Process

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.process.Process.getCompletedUnitCount() may expose internal representation by returning Process.completedUnitCount MALICIOUS_CODE EI_EXPOSE_REP 63 Medium
org.apache.shardingsphere.infra.executor.sql.process.Process.getIdle() may expose internal representation by returning Process.idle MALICIOUS_CODE EI_EXPOSE_REP 65 Medium
org.apache.shardingsphere.infra.executor.sql.process.Process.getInterrupted() may expose internal representation by returning Process.interrupted MALICIOUS_CODE EI_EXPOSE_REP 67 Medium
org.apache.shardingsphere.infra.executor.sql.process.Process.getProcessStatements() may expose internal representation by returning Process.processStatements MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
org.apache.shardingsphere.infra.executor.sql.process.Process.getTotalUnitCount() may expose internal representation by returning Process.totalUnitCount MALICIOUS_CODE EI_EXPOSE_REP 61 Medium
new org.apache.shardingsphere.infra.executor.sql.process.Process(String, long, String, String, String, String, AtomicInteger, AtomicInteger, AtomicBoolean, AtomicBoolean) may expose internal representation by storing an externally mutable object into Process.completedUnitCount MALICIOUS_CODE EI_EXPOSE_REP2 43 Medium
new org.apache.shardingsphere.infra.executor.sql.process.Process(String, long, String, String, String, String, AtomicInteger, AtomicInteger, AtomicBoolean, AtomicBoolean) may expose internal representation by storing an externally mutable object into Process.idle MALICIOUS_CODE EI_EXPOSE_REP2 43 Medium
new org.apache.shardingsphere.infra.executor.sql.process.Process(String, long, String, String, String, String, AtomicInteger, AtomicInteger, AtomicBoolean, AtomicBoolean) may expose internal representation by storing an externally mutable object into Process.interrupted MALICIOUS_CODE EI_EXPOSE_REP2 43 Medium
new org.apache.shardingsphere.infra.executor.sql.process.Process(String, long, String, String, String, String, AtomicInteger, AtomicInteger, AtomicBoolean, AtomicBoolean) may expose internal representation by storing an externally mutable object into Process.totalUnitCount MALICIOUS_CODE EI_EXPOSE_REP2 43 Medium

org.apache.shardingsphere.infra.executor.sql.process.ProcessRegistry

Bug Category Details Line Priority
Public static org.apache.shardingsphere.infra.executor.sql.process.ProcessRegistry.getInstance() may expose internal representation by returning ProcessRegistry.INSTANCE MALICIOUS_CODE MS_EXPOSE_REP 49 Medium

org.apache.shardingsphere.infra.executor.sql.process.yaml.YamlProcessList

Bug Category Details Line Priority
org.apache.shardingsphere.infra.executor.sql.process.yaml.YamlProcessList.getProcesses() may expose internal representation by returning YamlProcessList.processes MALICIOUS_CODE EI_EXPOSE_REP 34 Medium
org.apache.shardingsphere.infra.executor.sql.process.yaml.YamlProcessList.setProcesses(Collection) may expose internal representation by storing an externally mutable object into YamlProcessList.processes MALICIOUS_CODE EI_EXPOSE_REP2 31 Medium