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

Feature/fir 21173 add identity support #238

Closed
wants to merge 15 commits into from

Conversation

alexradzin
Copy link
Collaborator

updated minimal implementation of the new identity

Copy link
Contributor

@stepansergeevitch stepansergeevitch left a comment

Choose a reason for hiding this comment

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

Generally LGTM, left one question. I would also ask to wait for an approval from Petro

return loginProperties.toBuilder().host(engine.getEndpoint()).engine(engine.getName()).systemEngine(false).database(engine.getDatabase()).build();
}

private void assertDatabaseExisting(String database) throws SQLException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question, should't it also be throws FireboltException, since we do throw new FireboltException(...)?

Copy link
Collaborator Author

@alexradzin alexradzin Jul 13, 2023

Choose a reason for hiding this comment

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

No. Generally the interfaces should use general terms. Prefer interface to class, prefer interface/class higher in hierarchy than specific one. This is the basics of the OOD.
Specifically here. FireboltException extends SQLException and therefore can be thrown from any function that is declared as throws SQLException. The opposite is incorrect. If your function is declared as throws FireboltException it cannot throw SQLException. This is the reason that there many places in code that look like the following:

void someFunction() throws FireboltException {
    try {
        // some code that throws SQLException
    } catch (SQLException e) {
        throw new FireboltException(e)
    }
}

This try/catch is absolutely redundant. Just declare that function throws SQLException.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, makes sense

Copy link
Contributor

@ptiurin ptiurin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the change.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

85.8% 85.8% Coverage
0.0% 0.0% Duplication

@alexradzin
Copy link
Collaborator Author

This historical PR has been replaced by #252

@alexradzin alexradzin deleted the feature/FIR-21173-add-identity-support branch September 5, 2023 17:02
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