The following document contains the results of SpotBugs
SpotBugs Version is 4.9.2
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
224 | 82 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.autogen.version.ShardingSphereVersion.<static initializer for ShardingSphereVersion>() may fail to clean up java.io.InputStream | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 34 | Medium |
org.apache.shardingsphere.infra.autogen.version.ShardingSphereVersion.<static initializer for ShardingSphereVersion>() may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 34 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.config.database.impl.DataSourceGeneratedDatabaseConfiguration.getDataSources() may expose internal representation by returning DataSourceGeneratedDatabaseConfiguration.dataSources | MALICIOUS_CODE | EI_EXPOSE_REP | 49 | Medium |
org.apache.shardingsphere.infra.config.database.impl.DataSourceGeneratedDatabaseConfiguration.getRuleConfigurations() may expose internal representation by returning DataSourceGeneratedDatabaseConfiguration.ruleConfigurations | MALICIOUS_CODE | EI_EXPOSE_REP | 45 | Medium |
org.apache.shardingsphere.infra.config.database.impl.DataSourceGeneratedDatabaseConfiguration.getStorageUnits() may expose internal representation by returning DataSourceGeneratedDatabaseConfiguration.storageUnits | MALICIOUS_CODE | EI_EXPOSE_REP | 47 | Medium |
new org.apache.shardingsphere.infra.config.database.impl.DataSourceGeneratedDatabaseConfiguration(Map, Collection) may expose internal representation by storing an externally mutable object into DataSourceGeneratedDatabaseConfiguration.ruleConfigurations | MALICIOUS_CODE | EI_EXPOSE_REP2 | 52 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration.getDataSources() may expose internal representation by returning DataSourceProvidedDatabaseConfiguration.dataSources | MALICIOUS_CODE | EI_EXPOSE_REP | 47 | Medium |
org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration.getRuleConfigurations() may expose internal representation by returning DataSourceProvidedDatabaseConfiguration.ruleConfigurations | MALICIOUS_CODE | EI_EXPOSE_REP | 43 | Medium |
org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration.getStorageUnits() may expose internal representation by returning DataSourceProvidedDatabaseConfiguration.storageUnits | MALICIOUS_CODE | EI_EXPOSE_REP | 45 | Medium |
new org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration(Map, Collection) may expose internal representation by storing an externally mutable object into DataSourceProvidedDatabaseConfiguration.ruleConfigurations | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
new org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration(Map, Collection, Map) may expose internal representation by storing an externally mutable object into DataSourceProvidedDatabaseConfiguration.dataSources | MALICIOUS_CODE | EI_EXPOSE_REP2 | 63 | Medium |
new org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration(Map, Collection, Map) may expose internal representation by storing an externally mutable object into DataSourceProvidedDatabaseConfiguration.ruleConfigurations | MALICIOUS_CODE | EI_EXPOSE_REP2 | 60 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.apache.shardingsphere.infra.datanode.DataNodes(Collection) may expose internal representation by storing an externally mutable object into DataNodes.rules | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.hint.HintValueContext.getDisableAuditNames() may expose internal representation by returning HintValueContext.disableAuditNames | MALICIOUS_CODE | EI_EXPOSE_REP | 41 | Medium |
org.apache.shardingsphere.infra.hint.HintValueContext.getShardingDatabaseValues() may expose internal representation by returning HintValueContext.shardingDatabaseValues | MALICIOUS_CODE | EI_EXPOSE_REP | 37 | Medium |
org.apache.shardingsphere.infra.hint.HintValueContext.getShardingTableValues() may expose internal representation by returning HintValueContext.shardingTableValues | MALICIOUS_CODE | EI_EXPOSE_REP | 39 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.instance.ClusterInstanceRegistry.getAllClusterInstances() may expose internal representation by returning ClusterInstanceRegistry.allClusterInstances | MALICIOUS_CODE | EI_EXPOSE_REP | 32 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.instance.ComputeNodeInstance.getLabels() may expose internal representation by returning ComputeNodeInstance.labels | MALICIOUS_CODE | EI_EXPOSE_REP | 43 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.instance.ComputeNodeInstanceContext.getClusterInstanceRegistry() may expose internal representation by returning ComputeNodeInstanceContext.clusterInstanceRegistry | MALICIOUS_CODE | EI_EXPOSE_REP | 53 | Medium |
org.apache.shardingsphere.infra.instance.ComputeNodeInstanceContext.getInstance() may expose internal representation by returning ComputeNodeInstanceContext.instance | MALICIOUS_CODE | EI_EXPOSE_REP | 42 | Medium |
new org.apache.shardingsphere.infra.instance.ComputeNodeInstanceContext(ComputeNodeInstance, ModeConfiguration, EventBusContext) may expose internal representation by storing an externally mutable object into ComputeNodeInstanceContext.instance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.database.resource.ResourceMetaData.getDataSources() may expose internal representation by returning ResourceMetaData.dataSources | MALICIOUS_CODE | EI_EXPOSE_REP | 43 | Medium |
org.apache.shardingsphere.infra.metadata.database.resource.ResourceMetaData.getStorageUnits() may expose internal representation by returning ResourceMetaData.storageUnits | MALICIOUS_CODE | EI_EXPOSE_REP | 45 | Medium |
new org.apache.shardingsphere.infra.metadata.database.resource.ResourceMetaData(Map, Map) may expose internal representation by storing an externally mutable object into ResourceMetaData.dataSources | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
new org.apache.shardingsphere.infra.metadata.database.resource.ResourceMetaData(Map, Map) may expose internal representation by storing an externally mutable object into ResourceMetaData.storageUnits | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnit.getDataSource() may expose internal representation by returning StorageUnit.dataSource | MALICIOUS_CODE | EI_EXPOSE_REP | 44 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData.getRules() may expose internal representation by returning RuleMetaData.rules | MALICIOUS_CODE | EI_EXPOSE_REP | 46 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Redundant nullcheck of this$schemaName, which is known to be non-null in org.apache.shardingsphere.infra.metadata.database.schema.QualifiedTable.equals(Object) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 26 | Medium |
Redundant nullcheck of this$tableName, which is known to be non-null in org.apache.shardingsphere.infra.metadata.database.schema.QualifiedTable.equals(Object) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 26 | Medium |
Redundant nullcheck of $schemaName, which is known to be non-null in org.apache.shardingsphere.infra.metadata.database.schema.QualifiedTable.hashCode() | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 26 | Medium |
Redundant nullcheck of $tableName, which is known to be non-null in org.apache.shardingsphere.infra.metadata.database.schema.QualifiedTable.hashCode() | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 26 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.database.schema.builder.GenericSchemaBuilderMaterial.getRules() may expose internal representation by returning GenericSchemaBuilderMaterial.rules | MALICIOUS_CODE | EI_EXPOSE_REP | 38 | Medium |
org.apache.shardingsphere.infra.metadata.database.schema.builder.GenericSchemaBuilderMaterial.getStorageUnits() may expose internal representation by returning GenericSchemaBuilderMaterial.storageUnits | MALICIOUS_CODE | EI_EXPOSE_REP | 36 | Medium |
new org.apache.shardingsphere.infra.metadata.database.schema.builder.GenericSchemaBuilderMaterial(Map, Collection, ConfigurationProperties, String) may expose internal representation by storing an externally mutable object into GenericSchemaBuilderMaterial.rules | MALICIOUS_CODE | EI_EXPOSE_REP2 | 32 | Medium |
new org.apache.shardingsphere.infra.metadata.database.schema.builder.GenericSchemaBuilderMaterial(Map, Collection, ConfigurationProperties, String) may expose internal representation by storing an externally mutable object into GenericSchemaBuilderMaterial.storageUnits | MALICIOUS_CODE | EI_EXPOSE_REP2 | 32 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.database.schema.builder.KernelSupportedSystemTables.getTables() may expose internal representation by returning KernelSupportedSystemTables.tables | MALICIOUS_CODE | EI_EXPOSE_REP | 86 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereIndex.getColumns() may expose internal representation by returning ShardingSphereIndex.columns | MALICIOUS_CODE | EI_EXPOSE_REP | 37 | Medium |
new org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereIndex(String, Collection, boolean) may expose internal representation by storing an externally mutable object into ShardingSphereIndex.columns | MALICIOUS_CODE | EI_EXPOSE_REP2 | 30 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable.getColumnNames() may expose internal representation by returning ShardingSphereTable.columnNames | MALICIOUS_CODE | EI_EXPOSE_REP | 48 | Medium |
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable.getPrimaryKeyColumns() may expose internal representation by returning ShardingSphereTable.primaryKeyColumns | MALICIOUS_CODE | EI_EXPOSE_REP | 50 | Medium |
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable.getVisibleColumnAndIndexMap() may expose internal representation by returning ShardingSphereTable.visibleColumnAndIndexMap | MALICIOUS_CODE | EI_EXPOSE_REP | 54 | Medium |
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable.getVisibleColumns() may expose internal representation by returning ShardingSphereTable.visibleColumns | MALICIOUS_CODE | EI_EXPOSE_REP | 52 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.apache.shardingsphere.infra.metadata.database.schema.reviser.MetaDataReviseEngine(Collection) may expose internal representation by storing an externally mutable object into MetaDataReviseEngine.rules | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.apache.shardingsphere.infra.metadata.database.schema.reviser.schema.SchemaMetaDataReviseEngine(Collection, ConfigurationProperties) may expose internal representation by storing an externally mutable object into SchemaMetaDataReviseEngine.rules | MALICIOUS_CODE | EI_EXPOSE_REP2 | 37 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.statistics.DatabaseStatistics.getSchemaStatisticsMap() may expose internal representation by returning DatabaseStatistics.schemaStatisticsMap | MALICIOUS_CODE | EI_EXPOSE_REP | 32 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.statistics.RowStatistics.getRows() may expose internal representation by returning RowStatistics.rows | MALICIOUS_CODE | EI_EXPOSE_REP | 41 | Medium |
new org.apache.shardingsphere.infra.metadata.statistics.RowStatistics(String, List) may expose internal representation by storing an externally mutable object into RowStatistics.rows | MALICIOUS_CODE | EI_EXPOSE_REP2 | 33 | Medium |
new org.apache.shardingsphere.infra.metadata.statistics.RowStatistics(List) may expose internal representation by storing an externally mutable object into RowStatistics.rows | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.statistics.SchemaStatistics.getTableStatisticsMap() may expose internal representation by returning SchemaStatistics.tableStatisticsMap | MALICIOUS_CODE | EI_EXPOSE_REP | 32 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics.getDatabaseStatisticsMap() may expose internal representation by returning ShardingSphereStatistics.databaseStatisticsMap | MALICIOUS_CODE | EI_EXPOSE_REP | 32 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.metadata.statistics.TableStatistics.getRows() may expose internal representation by returning TableStatistics.rows | MALICIOUS_CODE | EI_EXPOSE_REP | 38 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception thrown in class org.apache.shardingsphere.infra.props.TypedProperties at new org.apache.shardingsphere.infra.props.TypedProperties(Class, Properties) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 44 | Medium |
org.apache.shardingsphere.infra.props.TypedProperties.getProps() may expose internal representation by returning TypedProperties.props | MALICIOUS_CODE | EI_EXPOSE_REP | 37 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.rule.attribute.datasource.aggregate.AggregatedDataSourceRuleAttribute.getAggregatedDataSources() may expose internal representation by returning AggregatedDataSourceRuleAttribute.aggregatedDataSources | MALICIOUS_CODE | EI_EXPOSE_REP | 34 | Medium |
new org.apache.shardingsphere.infra.rule.attribute.datasource.aggregate.AggregatedDataSourceRuleAttribute(Map) may expose internal representation by storing an externally mutable object into AggregatedDataSourceRuleAttribute.aggregatedDataSources | MALICIOUS_CODE | EI_EXPOSE_REP2 | 30 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.getDataSources() may expose internal representation by returning YamlRootConfiguration.dataSources | MALICIOUS_CODE | EI_EXPOSE_REP | 41 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.getMode() may expose internal representation by returning YamlRootConfiguration.mode | MALICIOUS_CODE | EI_EXPOSE_REP | 45 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.getProps() may expose internal representation by returning YamlRootConfiguration.props | MALICIOUS_CODE | EI_EXPOSE_REP | 47 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.getRules() may expose internal representation by returning YamlRootConfiguration.rules | MALICIOUS_CODE | EI_EXPOSE_REP | 43 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.setDataSources(Map) may expose internal representation by storing an externally mutable object into YamlRootConfiguration.dataSources | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.setMode(YamlModeConfiguration) may expose internal representation by storing an externally mutable object into YamlRootConfiguration.mode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.setProps(Properties) may expose internal representation by storing an externally mutable object into YamlRootConfiguration.props | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration.setRules(Collection) may expose internal representation by storing an externally mutable object into YamlRootConfiguration.rules | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.yaml.config.pojo.mode.YamlModeConfiguration.getRepository() may expose internal representation by returning YamlModeConfiguration.repository | MALICIOUS_CODE | EI_EXPOSE_REP | 33 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.mode.YamlModeConfiguration.setRepository(YamlPersistRepositoryConfiguration) may expose internal representation by storing an externally mutable object into YamlModeConfiguration.repository | MALICIOUS_CODE | EI_EXPOSE_REP2 | 28 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.yaml.config.pojo.mode.YamlPersistRepositoryConfiguration.getProps() may expose internal representation by returning YamlPersistRepositoryConfiguration.props | MALICIOUS_CODE | EI_EXPOSE_REP | 35 | Medium |
org.apache.shardingsphere.infra.yaml.config.pojo.mode.YamlPersistRepositoryConfiguration.setProps(Properties) may expose internal representation by storing an externally mutable object into YamlPersistRepositoryConfiguration.props | MALICIOUS_CODE | EI_EXPOSE_REP2 | 30 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.yaml.data.pojo.YamlRowStatistics.getRows() may expose internal representation by returning YamlRowStatistics.rows | MALICIOUS_CODE | EI_EXPOSE_REP | 35 | Medium |
org.apache.shardingsphere.infra.yaml.data.pojo.YamlRowStatistics.setRows(List) may expose internal representation by storing an externally mutable object into YamlRowStatistics.rows | MALICIOUS_CODE | EI_EXPOSE_REP2 | 30 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.apache.shardingsphere.infra.yaml.data.swapper.YamlRowStatisticsSwapper(List) may expose internal representation by storing an externally mutable object into YamlRowStatisticsSwapper.columns | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereIndex.getColumns() may expose internal representation by returning YamlShardingSphereIndex.columns | MALICIOUS_CODE | EI_EXPOSE_REP | 36 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereIndex.setColumns(Collection) may expose internal representation by storing an externally mutable object into YamlShardingSphereIndex.columns | MALICIOUS_CODE | EI_EXPOSE_REP2 | 31 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereSchema.getTables() may expose internal representation by returning YamlShardingSphereSchema.tables | MALICIOUS_CODE | EI_EXPOSE_REP | 35 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereSchema.getViews() may expose internal representation by returning YamlShardingSphereSchema.views | MALICIOUS_CODE | EI_EXPOSE_REP | 37 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereSchema.setTables(Map) may expose internal representation by storing an externally mutable object into YamlShardingSphereSchema.tables | MALICIOUS_CODE | EI_EXPOSE_REP2 | 30 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereSchema.setViews(Map) may expose internal representation by storing an externally mutable object into YamlShardingSphereSchema.views | MALICIOUS_CODE | EI_EXPOSE_REP2 | 30 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereTable.getColumns() may expose internal representation by returning YamlShardingSphereTable.columns | MALICIOUS_CODE | EI_EXPOSE_REP | 36 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereTable.getConstraints() may expose internal representation by returning YamlShardingSphereTable.constraints | MALICIOUS_CODE | EI_EXPOSE_REP | 40 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereTable.getIndexes() may expose internal representation by returning YamlShardingSphereTable.indexes | MALICIOUS_CODE | EI_EXPOSE_REP | 38 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereTable.setColumns(Map) may expose internal representation by storing an externally mutable object into YamlShardingSphereTable.columns | MALICIOUS_CODE | EI_EXPOSE_REP2 | 31 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereTable.setConstraints(Map) may expose internal representation by storing an externally mutable object into YamlShardingSphereTable.constraints | MALICIOUS_CODE | EI_EXPOSE_REP2 | 31 | Medium |
org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereTable.setIndexes(Map) may expose internal representation by storing an externally mutable object into YamlShardingSphereTable.indexes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 31 | Medium |