Skip to content

Commit

Permalink
Bump spotbugsPluginVersion from 5.1.4 to 5.2.3 (#1289)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toshihiro Suzuki <[email protected]>
  • Loading branch information
dependabot[bot] and brfrn169 authored Nov 24, 2023
1 parent 93519ce commit 5b80478
Show file tree
Hide file tree
Showing 27 changed files with 105 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ subprojects {
gsonVersion = '2.10.1'
log4jVersion = '2.21.1'
stefanbirknerSystemLambdaVersion = '1.2.1'
spotbugsPluginVersion = '5.1.4'
spotbugsPluginVersion = '5.2.3'
errorpronePluginVersion = '2.0.2'
protobufPluginVersion = '0.8.19'
shadowPluginVersion = '7.1.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public JdbcAdminImportTestUtils(Properties properties) {
majorVersion = getMajorVersion();
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public Map<String, TableMetadata> createExistingDatabaseWithAllDataTypes(String namespace)
throws SQLException {
execute(rdbEngine.createSchemaSqls(namespace));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ private ActiveTransaction(DistributedTransaction transaction) throws Transaction
add(this);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

@Override
public String getId() {
return transaction.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ private ActiveTransaction(TwoPhaseCommitTransaction transaction) throws Transact
add(this);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

@Override
public String getId() {
return transaction.getId();
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/java/com/scalar/db/config/DatabaseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ 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);
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/java/com/scalar/db/io/BigIntColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public CassandraConfig(DatabaseConfig databaseConfig) {
metadataKeyspace = getString(databaseConfig.getProperties(), METADATA_KEYSPACE, null);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public Optional<String> getMetadataKeyspace() {
return Optional.ofNullable(metadataKeyspace);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
public class CosmosConfig {
private static final Logger logger = LoggerFactory.getLogger(CosmosConfig.class);
public static final String PREFIX = DatabaseConfig.PREFIX + "cosmos.";

/** @deprecated As of 5.0, will be removed. Use {@link #METADATA_DATABASE} instead. */
@Deprecated
public static final String TABLE_METADATA_DATABASE = PREFIX + "table_metadata.database";
Expand Down Expand Up @@ -52,6 +53,10 @@ public CosmosConfig(DatabaseConfig databaseConfig) {
}
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public String getEndpoint() {
return endpoint;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class DynamoConfig {

public static final String PREFIX = DatabaseConfig.PREFIX + "dynamo.";
public static final String ENDPOINT_OVERRIDE = PREFIX + "endpoint_override";

/** @deprecated As of 5.0, will be removed. Use {@link #METADATA_NAMESPACE} instead. */
@Deprecated
public static final String TABLE_METADATA_NAMESPACE = PREFIX + "table_metadata.namespace";
Expand Down Expand Up @@ -76,6 +77,10 @@ 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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public ConditionalMutator(
rdbEngine = RdbEngineFactory.create(connection);
}

// 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();
Expand Down
5 changes: 5 additions & 0 deletions core/src/main/java/com/scalar/db/storage/jdbc/JdbcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class JdbcConfig {
PREFIX + "prepared_statements_pool.max_open";

public static final String ISOLATION_LEVEL = PREFIX + "isolation_level";

/** @deprecated As of 5.0, will be removed. Use {@link #METADATA_SCHEMA} instead. */
@Deprecated public static final String TABLE_METADATA_SCHEMA = PREFIX + "table_metadata.schema";

Expand Down Expand Up @@ -180,6 +181,10 @@ public JdbcConfig(DatabaseConfig databaseConfig) {
}
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public String getJdbcUrl() {
return jdbcUrl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ 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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public MultiStorageConfig(DatabaseConfig databaseConfig) {
checkIfStorageExists(defaultStorage);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

private ImmutableMap<String, Properties> loadDatabasePropertiesMapping(Properties properties) {
String[] storages = getStringArray(properties, STORAGES, null);
if (storages == null) {
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/java/com/scalar/db/storage/rpc/GrpcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public GrpcConfig(DatabaseConfig databaseConfig) {
getInt(databaseConfig.getProperties(), MAX_INBOUND_METADATA_SIZE, null);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public String getHost() {
return host;
}
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/java/com/scalar/db/storage/rpc/ScannerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public ScannerImpl(
results = stream.openScanner(scan);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

@Override
public Optional<Result> one() throws ExecutionException {
if (results.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public ConsensusCommitConfig(DatabaseConfig databaseConfig) {
getBoolean(databaseConfig.getProperties(), PARALLEL_IMPLICIT_PRE_READ, true);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public Isolation getIsolation() {
return isolation;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ 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, TransactionState state, long createdAt) {
this.id = checkNotNull(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ public void upgrade_WithExistingTables_ShouldUpsertNamespaces() throws Execution
tableMetadataContainer,
namespacesContainer,
namespacesContainer);
@SuppressWarnings("unchecked")
CosmosPagedIterable<CosmosTableMetadata> cosmosPagedIterable = mock(CosmosPagedIterable.class);
CosmosTableMetadata tableMetadata1 = CosmosTableMetadata.newBuilder().id("ns1.tbl1").build();
CosmosTableMetadata tableMetadata2 = CosmosTableMetadata.newBuilder().id("ns1.tbl2").build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public ImportSchemaParser(String serializedSchemaJson, Map<String, String> optio
this.options = ImmutableMap.copyOf(options);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public List<ImportTableSchema> parse() throws SchemaLoaderException {
List<ImportTableSchema> tableSchemaList = new ArrayList<>();
for (Map.Entry<String, JsonElement> entry : schemaJson.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public ImportTableSchema(
this.options = buildOptions(tableDefinition, options);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

private ImmutableMap<String, String> buildOptions(
JsonObject tableDefinition, Map<String, String> globalOptions) {
ImmutableMap.Builder<String, String> optionsBuilder = ImmutableMap.builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ 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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public SchemaParser(String serializedSchemaJson, Map<String, String> options)
this.options = ImmutableMap.copyOf(options);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

public List<TableSchema> parse() throws SchemaLoaderException {
ArrayList<TableSchema> tableSchemaList = new ArrayList<>();
for (Map.Entry<String, JsonElement> entry : schemaJson.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public TableSchema(String tableFullName, JsonObject tableDefinition, Map<String,
this.options = buildOptions(tableDefinition, options);
}

// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}

protected TableMetadata buildTableMetadata(JsonObject tableDefinition)
throws SchemaLoaderException {
TableMetadata.Builder tableBuilder = TableMetadata.newBuilder();
Expand Down
4 changes: 4 additions & 0 deletions server/src/main/java/com/scalar/db/server/ServerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public ServerConfig(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);
Expand Down

0 comments on commit 5b80478

Please sign in to comment.