Skip to content

Commit

Permalink
chore: last sonar checks
Browse files Browse the repository at this point in the history
  • Loading branch information
filipelautert committed Jun 5, 2024
1 parent 093a1f5 commit 91fad60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot

String definition = rawViewDefinition;

if (definition.isEmpty()) {
if (definition == null || definition.isEmpty()) {
definition = (String) row.get("view_definition");

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected String generateSingleColumnSQL(AddColumnStatement statement, Database
alterTable.append(" ").append(database.getAutoIncrementClause(autoIncrementConstraint.getStartWith(), autoIncrementConstraint.getIncrementBy(), autoIncrementConstraint.getGenerationType(), autoIncrementConstraint.getDefaultOnNull()));
}

alterTable.append(this.getDefaultClause(statement, database));
alterTable.append(this.getDefaultClauseForColumn(statement, database));
if (!statement.isNullable()) {
Iterator<ColumnConstraint> var8 = statement.getConstraints().iterator();

Expand Down Expand Up @@ -90,7 +90,7 @@ protected String generateSingleColumnSQL(AddColumnStatement statement, Database
}


private String getDefaultClause(AddColumnStatement statement, Database database) {
private String getDefaultClauseForColumn(AddColumnStatement statement, Database database) {
StringBuilder clause = new StringBuilder();
Object defaultValue = statement.getDefaultValue();
if (defaultValue != null) {
Expand Down

0 comments on commit 91fad60

Please sign in to comment.