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

Merged
merged 3 commits into from
Nov 18, 2024
Merged

[DAT-18844] resolved some sonar issues #207

merged 3 commits into from
Nov 18, 2024

Conversation

KushnirykOleh
Copy link
Contributor

No description provided.

@@ -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 requested a review from SvampX October 31, 2024 15:17
@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
@KushnirykOleh KushnirykOleh merged commit 22afa27 into main Nov 18, 2024
11 checks passed
@KushnirykOleh KushnirykOleh deleted the DAT-18844 branch November 18, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants