Skip to content

Commit

Permalink
Backport to branch(3) : Bump spotbugsPluginVersion from 5.1.4 to 5.2.3 (
Browse files Browse the repository at this point in the history
#1320)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
brfrn169 and dependabot[bot] authored Nov 24, 2023
1 parent 7bc80fd commit ec561d5
Show file tree
Hide file tree
Showing 25 changed files with 97 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 @@ -117,6 +117,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 {
if (rdbEngine instanceof RdbEngineMysql) {
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 @@ -32,6 +32,10 @@ public CosmosConfig(DatabaseConfig databaseConfig) {
getString(databaseConfig.getProperties(), TABLE_METADATA_DATABASE, null);
}

// 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 @@ -57,6 +57,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 @@ -15,6 +15,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
4 changes: 4 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 @@ -158,6 +158,10 @@ public JdbcConfig(DatabaseConfig databaseConfig) {
DEFAULT_ADMIN_CONNECTION_POOL_MAX_TOTAL);
}

// 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 @@ -33,6 +33,10 @@ public ImportSchemaParser(String serializedSchemaJson) throws SchemaLoaderExcept
}
}

// 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 @@ -27,6 +27,10 @@ public ImportTableSchema(String tableFullName, JsonObject tableDefinition)
}
}

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

public String getNamespace() {
return namespace;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,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 ec561d5

Please sign in to comment.