Skip to content

Commit

Permalink
Suppress invalid "close with resources" sonar warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nvoxland committed Jul 20, 2022
1 parent bbbd3a8 commit ad64480
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import liquibase.database.Database;
import liquibase.database.DatabaseList;
import liquibase.database.core.*;
import liquibase.exception.DatabaseException;
import liquibase.exception.UnexpectedLiquibaseException;
import liquibase.exception.ValidationErrors;
import liquibase.statement.SqlStatement;
Expand Down Expand Up @@ -344,6 +345,7 @@ public String getSerializedObjectNamespace() {
return STANDARD_CHANGELOG_NAMESPACE;
}

@SuppressWarnings("java:S2095")
@Override
protected Map<String, Object> createExampleValueMetaData(
String parameterName, DatabaseChangeProperty changePropertyAnnotation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public DatabaseConnection openConnection(String url,
return openConnection(url, username, driver, databaseClass, driverProperties, resourceAccessor);
}

@SuppressWarnings("java:S2095")
public DatabaseConnection openConnection(String url,
String username,
String driver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public static Database createDatabaseObject(ClassLoader classLoader,
databaseChangeLogTableName, databaseChangeLogLockTableName);
}

@SuppressWarnings("java:S2095")
public static Database createDatabaseObject(ResourceAccessor resourceAccessor,
String url,
String username,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

public class YamlSnapshotParser extends YamlParser implements SnapshotParser {

@SuppressWarnings("java:S2095")
@Override
public DatabaseSnapshot parse(String path, ResourceAccessor resourceAccessor) throws LiquibaseParseException {
Yaml yaml = new Yaml(new SafeConstructor());
Expand Down

0 comments on commit ad64480

Please sign in to comment.