diff --git a/core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcAdminImportTestUtils.java b/core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcAdminImportTestUtils.java index 65d03522bb..237c7304e7 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcAdminImportTestUtils.java +++ b/core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcAdminImportTestUtils.java @@ -118,10 +118,6 @@ public JdbcAdminImportTestUtils(Properties properties) { majorVersion = getMajorVersion(); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public Map createExistingDatabaseWithAllDataTypes(String namespace) throws SQLException { execute(rdbEngine.createSchemaSqls(namespace)); diff --git a/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedDistributedTransactionManager.java b/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedDistributedTransactionManager.java index a1500d82bb..dbb292decd 100644 --- a/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedDistributedTransactionManager.java +++ b/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedDistributedTransactionManager.java @@ -103,10 +103,6 @@ private ActiveTransaction(DistributedTransaction transaction) throws Transaction add(this); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override public synchronized Optional get(Get get) throws CrudException { return super.get(get); diff --git a/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedTwoPhaseCommitTransactionManager.java b/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedTwoPhaseCommitTransactionManager.java index db96c6ae47..1e2e256af3 100644 --- a/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedTwoPhaseCommitTransactionManager.java +++ b/core/src/main/java/com/scalar/db/common/ActiveTransactionManagedTwoPhaseCommitTransactionManager.java @@ -110,10 +110,6 @@ private ActiveTransaction(TwoPhaseCommitTransaction transaction) throws Transact add(this); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override public synchronized Optional get(Get get) throws CrudException { return super.get(get); diff --git a/core/src/main/java/com/scalar/db/config/DatabaseConfig.java b/core/src/main/java/com/scalar/db/config/DatabaseConfig.java index 00ed3c0e29..88e960699f 100644 --- a/core/src/main/java/com/scalar/db/config/DatabaseConfig.java +++ b/core/src/main/java/com/scalar/db/config/DatabaseConfig.java @@ -84,10 +84,6 @@ public DatabaseConfig(Path propertiesPath) throws IOException { this(propertiesPath.toFile()); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public Properties getProperties() { Properties ret = new Properties(); ret.putAll(props); diff --git a/core/src/main/java/com/scalar/db/io/BigIntColumn.java b/core/src/main/java/com/scalar/db/io/BigIntColumn.java index eb61d6715f..2afb614e89 100644 --- a/core/src/main/java/com/scalar/db/io/BigIntColumn.java +++ b/core/src/main/java/com/scalar/db/io/BigIntColumn.java @@ -40,10 +40,6 @@ private BigIntColumn(String name, long value, boolean hasNullValue) { this.hasNullValue = hasNullValue; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override public String getName() { return name; diff --git a/core/src/main/java/com/scalar/db/storage/cassandra/Cassandra.java b/core/src/main/java/com/scalar/db/storage/cassandra/Cassandra.java index 5be750ee74..a779bac2de 100644 --- a/core/src/main/java/com/scalar/db/storage/cassandra/Cassandra.java +++ b/core/src/main/java/com/scalar/db/storage/cassandra/Cassandra.java @@ -88,10 +88,6 @@ public Cassandra(DatabaseConfig config) { this.operationChecker = operationChecker; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override @Nonnull public Optional get(Get get) throws ExecutionException { diff --git a/core/src/main/java/com/scalar/db/storage/cassandra/CassandraConfig.java b/core/src/main/java/com/scalar/db/storage/cassandra/CassandraConfig.java index 89e41df62b..c6416dbd58 100644 --- a/core/src/main/java/com/scalar/db/storage/cassandra/CassandraConfig.java +++ b/core/src/main/java/com/scalar/db/storage/cassandra/CassandraConfig.java @@ -16,10 +16,6 @@ public CassandraConfig(DatabaseConfig databaseConfig) { metadataKeyspace = databaseConfig.getSystemNamespaceName(); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public String getMetadataKeyspace() { return metadataKeyspace; } diff --git a/core/src/main/java/com/scalar/db/storage/cosmos/Cosmos.java b/core/src/main/java/com/scalar/db/storage/cosmos/Cosmos.java index 7aecec1735..4b07a50194 100644 --- a/core/src/main/java/com/scalar/db/storage/cosmos/Cosmos.java +++ b/core/src/main/java/com/scalar/db/storage/cosmos/Cosmos.java @@ -88,10 +88,6 @@ public Cosmos(DatabaseConfig databaseConfig) { this.operationChecker = operationChecker; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override @Nonnull public Optional get(Get get) throws ExecutionException { diff --git a/core/src/main/java/com/scalar/db/storage/cosmos/CosmosConfig.java b/core/src/main/java/com/scalar/db/storage/cosmos/CosmosConfig.java index 2ccccaf308..b6ce6de2d1 100644 --- a/core/src/main/java/com/scalar/db/storage/cosmos/CosmosConfig.java +++ b/core/src/main/java/com/scalar/db/storage/cosmos/CosmosConfig.java @@ -58,10 +58,6 @@ public CosmosConfig(DatabaseConfig databaseConfig) { consistencyLevel = getString(databaseConfig.getProperties(), CONSISTENCY_LEVEL, null); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public String getEndpoint() { return endpoint; } diff --git a/core/src/main/java/com/scalar/db/storage/dynamo/Dynamo.java b/core/src/main/java/com/scalar/db/storage/dynamo/Dynamo.java index e841d59e00..c3545323c6 100644 --- a/core/src/main/java/com/scalar/db/storage/dynamo/Dynamo.java +++ b/core/src/main/java/com/scalar/db/storage/dynamo/Dynamo.java @@ -105,10 +105,6 @@ public Dynamo(DatabaseConfig databaseConfig) { this.operationChecker = operationChecker; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override @Nonnull public Optional get(Get get) throws ExecutionException { diff --git a/core/src/main/java/com/scalar/db/storage/dynamo/DynamoConfig.java b/core/src/main/java/com/scalar/db/storage/dynamo/DynamoConfig.java index 05964d3f78..d964e0df56 100644 --- a/core/src/main/java/com/scalar/db/storage/dynamo/DynamoConfig.java +++ b/core/src/main/java/com/scalar/db/storage/dynamo/DynamoConfig.java @@ -77,10 +77,6 @@ public DynamoConfig(DatabaseConfig databaseConfig) { namespacePrefix = getString(databaseConfig.getProperties(), NAMESPACE_PREFIX, null); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public String getRegion() { return region; } diff --git a/core/src/main/java/com/scalar/db/storage/dynamo/Namespace.java b/core/src/main/java/com/scalar/db/storage/dynamo/Namespace.java index 5533fa488d..9721a14a31 100644 --- a/core/src/main/java/com/scalar/db/storage/dynamo/Namespace.java +++ b/core/src/main/java/com/scalar/db/storage/dynamo/Namespace.java @@ -17,10 +17,6 @@ private Namespace(String prefix, String name) { this.name = name; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public static Namespace of(String prefix, String name) { return new Namespace(prefix, name); } diff --git a/core/src/main/java/com/scalar/db/storage/jdbc/ConditionalMutator.java b/core/src/main/java/com/scalar/db/storage/jdbc/ConditionalMutator.java index 36cf6fa166..7ddfb3f812 100644 --- a/core/src/main/java/com/scalar/db/storage/jdbc/ConditionalMutator.java +++ b/core/src/main/java/com/scalar/db/storage/jdbc/ConditionalMutator.java @@ -56,10 +56,6 @@ public ConditionalMutator( this.queryBuilder = queryBuilder; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public boolean mutate() throws SQLException { mutation.getCondition().ifPresent(condition -> condition.accept(this)); throwSQLExceptionIfOccurred(); diff --git a/core/src/main/java/com/scalar/db/storage/jdbc/JdbcConfig.java b/core/src/main/java/com/scalar/db/storage/jdbc/JdbcConfig.java index 64b44dab2b..58c59d79f7 100644 --- a/core/src/main/java/com/scalar/db/storage/jdbc/JdbcConfig.java +++ b/core/src/main/java/com/scalar/db/storage/jdbc/JdbcConfig.java @@ -227,10 +227,6 @@ public JdbcConfig(DatabaseConfig databaseConfig) { } } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public String getJdbcUrl() { return jdbcUrl; } diff --git a/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithFetchFirstNRowsOnly.java b/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithFetchFirstNRowsOnly.java index bf3aee6a54..46d05663e9 100644 --- a/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithFetchFirstNRowsOnly.java +++ b/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithFetchFirstNRowsOnly.java @@ -13,10 +13,6 @@ public SelectWithFetchFirstNRowsOnly(Builder builder, int limit) { this.limit = limit; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override public String sql() { return super.sql() + " FETCH FIRST " + limit + " ROWS ONLY"; diff --git a/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithLimitQuery.java b/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithLimitQuery.java index 016a8197b0..1d64a31641 100644 --- a/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithLimitQuery.java +++ b/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithLimitQuery.java @@ -13,10 +13,6 @@ public SelectWithLimitQuery(Builder builder, int limit) { this.limit = limit; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override public String sql() { return super.sql() + " LIMIT " + limit; diff --git a/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithTop.java b/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithTop.java index c2ab6d5018..4c9295167b 100644 --- a/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithTop.java +++ b/core/src/main/java/com/scalar/db/storage/jdbc/query/SelectWithTop.java @@ -13,10 +13,6 @@ public SelectWithTop(Builder builder, int limit) { this.limit = limit; } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @Override public String sql() { // This inserts "TOP ${limit}" clause, specific to SqlServer, right after the "SELECT" clause of diff --git a/core/src/main/java/com/scalar/db/storage/multistorage/MultiStorageConfig.java b/core/src/main/java/com/scalar/db/storage/multistorage/MultiStorageConfig.java index 3b7bd40f28..a352b455e7 100644 --- a/core/src/main/java/com/scalar/db/storage/multistorage/MultiStorageConfig.java +++ b/core/src/main/java/com/scalar/db/storage/multistorage/MultiStorageConfig.java @@ -44,10 +44,6 @@ public MultiStorageConfig(DatabaseConfig databaseConfig) { checkIfStorageExists(defaultStorage); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - private ImmutableMap loadDatabasePropertiesMapping(Properties properties) { String[] storages = getStringArray(properties, STORAGES, null); if (storages == null) { diff --git a/core/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitConfig.java b/core/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitConfig.java index 5f0fb08567..f60716650c 100644 --- a/core/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitConfig.java +++ b/core/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitConfig.java @@ -189,10 +189,6 @@ public ConsensusCommitConfig(DatabaseConfig databaseConfig) { false); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public Isolation getIsolation() { return isolation; } diff --git a/core/src/main/java/com/scalar/db/transaction/consensuscommit/Coordinator.java b/core/src/main/java/com/scalar/db/transaction/consensuscommit/Coordinator.java index 54f3139515..77b5e6ac50 100644 --- a/core/src/main/java/com/scalar/db/transaction/consensuscommit/Coordinator.java +++ b/core/src/main/java/com/scalar/db/transaction/consensuscommit/Coordinator.java @@ -332,10 +332,6 @@ public State(String id, TransactionState state) { this(id, state, System.currentTimeMillis()); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @VisibleForTesting State(String id, List childIds, TransactionState state, long createdAt) { this.id = checkNotNull(id); diff --git a/core/src/main/java/com/scalar/db/util/groupcommit/GroupCommitConfig.java b/core/src/main/java/com/scalar/db/util/groupcommit/GroupCommitConfig.java index af61be1fbf..6edb65dc0c 100644 --- a/core/src/main/java/com/scalar/db/util/groupcommit/GroupCommitConfig.java +++ b/core/src/main/java/com/scalar/db/util/groupcommit/GroupCommitConfig.java @@ -64,10 +64,6 @@ public GroupCommitConfig( false); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public int slotCapacity() { return slotCapacity; } diff --git a/gradle/spotbugs-exclude.xml b/gradle/spotbugs-exclude.xml index 05571f3fdb..570c9553da 100644 --- a/gradle/spotbugs-exclude.xml +++ b/gradle/spotbugs-exclude.xml @@ -6,9 +6,10 @@ - + + diff --git a/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportSchemaParser.java b/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportSchemaParser.java index 9c704a83d3..e3830d9f3d 100644 --- a/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportSchemaParser.java +++ b/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportSchemaParser.java @@ -30,10 +30,6 @@ public ImportSchemaParser(String serializedSchemaJson, Map optio this.options = ImmutableMap.copyOf(options); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public List parse() { List tableSchemaList = new ArrayList<>(); for (Map.Entry entry : schemaJson.entrySet()) { diff --git a/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportTableSchema.java b/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportTableSchema.java index 94ee36b424..4023afe68f 100644 --- a/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportTableSchema.java +++ b/schema-loader/src/main/java/com/scalar/db/schemaloader/ImportTableSchema.java @@ -33,10 +33,6 @@ public ImportTableSchema( this.options = buildOptions(tableDefinition, options); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - private ImmutableMap buildOptions( JsonObject tableDefinition, Map globalOptions) { ImmutableMap.Builder optionsBuilder = ImmutableMap.builder(); diff --git a/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaOperator.java b/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaOperator.java index e08fac0aca..11b3965f8e 100644 --- a/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaOperator.java +++ b/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaOperator.java @@ -45,10 +45,6 @@ public SchemaOperator(Properties properties) { this(StorageFactory.create(properties), TransactionFactory.create(properties)); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - @VisibleForTesting SchemaOperator(StorageFactory storageFactory, TransactionFactory transactionFactory) { storageAdmin = diff --git a/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaParser.java b/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaParser.java index 623d519ade..927ebc453e 100644 --- a/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaParser.java +++ b/schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaParser.java @@ -31,10 +31,6 @@ public SchemaParser(String serializedSchemaJson, Map options) { this.options = ImmutableMap.copyOf(options); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - public List parse() { List tableSchemaList = new ArrayList<>(); for (Map.Entry entry : schemaJson.entrySet()) { diff --git a/schema-loader/src/main/java/com/scalar/db/schemaloader/TableSchema.java b/schema-loader/src/main/java/com/scalar/db/schemaloader/TableSchema.java index 26ffa79330..32414f5f38 100644 --- a/schema-loader/src/main/java/com/scalar/db/schemaloader/TableSchema.java +++ b/schema-loader/src/main/java/com/scalar/db/schemaloader/TableSchema.java @@ -70,10 +70,6 @@ public TableSchema( this.options = buildOptions(tableDefinition, options); } - // For the SpotBugs warning CT_CONSTRUCTOR_THROW - @Override - protected final void finalize() {} - protected TableMetadata buildTableMetadata(String tableFullName, JsonObject tableDefinition) { TableMetadata.Builder tableBuilder = TableMetadata.newBuilder();