Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DAT-18844] resolved some sonar issues #207

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

KushnirykOleh
Copy link
Contributor

No description provided.

Copy link

sonarcloud bot commented Oct 31, 2024

@@ -16,11 +15,6 @@ public class AlterTablePropertiesChangeDatabricks extends AbstractAlterPropertie
private static final String CHANGE_TYPE_SUBJECT = "Table";
private String tableName;

@Override
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AbstractAlterPropertiesChangeDatabricks already has supports() method that check DatabricksDatabase

@KushnirykOleh KushnirykOleh marked this pull request as ready for review October 31, 2024 15:17
@@ -106,20 +103,17 @@ public Sql[] generateSql(InsertOrUpdateStatement insertOrUpdateStatement, Databa
completeSql.append(updateStatement);

// Add insert statement to MERGE if not ONLY an update statement
if (!insertOrUpdateStatement.getOnlyUpdate()) {
if (Boolean.FALSE.equals(insertOrUpdateStatement.getOnlyUpdate())) {
Copy link
Contributor

@SvampX SvampX Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it a complain because of autoboxing?
I have a bunch of similar checks in other places, but with primitive type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda, it complains about auto-Unboxing, saying in case of getOnlyUpdate() is null we'll get NPE

@SvampX
Copy link
Contributor

SvampX commented Oct 31, 2024

LGTM!

@liquibot liquibot removed the java label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants