-
Notifications
You must be signed in to change notification settings - Fork 825
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
Refactoring: testable code in JdbcScimUserProvisioning #2863
Conversation
* Create bean for extra SimpleSearchQueryConverter * Need an extra SimpleSearchQueryConverter for the search with join but this object can be created once. * Need NamedParameterJdbcTemplate for the search but this object can be created once * Removed interface methods which are never used Created JUnit tests for all cases in retrieveByScimFilterOnlyActive and verify the existence of LOWER
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/187536128 The labels on this github issue will be updated when the story is started. |
@@ -43,6 +44,10 @@ public void setQueryConverter(SearchQueryConverter queryConverter) { | |||
this.queryConverter = queryConverter; | |||
} | |||
|
|||
public void setNamedParameterJdbcTemplate(NamedParameterJdbcTemplate namedParameterJdbcTemplate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be removed / refactored, if #2864 is merged before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some observations from my first reading of this PR.
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimUserProvisioning.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimUserProvisioning.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/SimpleSearchQueryConverter.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/resources/JoinAttributeNameMapper.java
Show resolved
Hide resolved
becaue of refactoring from review
Create bean for extra SimpleSearchQueryConverter
Need an extra SimpleSearchQueryConverter for the search with join but this object can be created once.
Need NamedParameterJdbcTemplate for the search but this object can be created once
Removed interface methods which are never used
Created JUnit tests for all cases in retrieveByScimFilterOnlyActive and verify the existence of LOWER
e.g.
https://www.baeldung.com/java-clean-code#characteristics_of_clean_code