-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add security identity management support #3
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
Conversation
louis-bompart
left a comment
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.
I think you could use final in a lot of places to make your code more performant (although marginally I reckon.).
| import java.util.Map; | ||
|
|
||
| public class AliasMapping extends IdentityModel { | ||
| public String provider; |
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.
After initializing the variable, you never change the value. You should therefore transcribe that behaviour semantically with the final keyword. It can help the JVM and thus increase the performance.
| public String provider; | |
| public final String provider; |
| public Map<String, String> additionalInfo; | ||
| public String name; | ||
| public SecurityIdentityType type; |
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.
After initializing those variables, you never change their values. You should therefore transcribe that behaviour semantically with the final keyword. It can help the JVM and thus increase the performance.
| public Map<String, String> additionalInfo; | |
| public String name; | |
| public SecurityIdentityType type; | |
| public final Map<String, String> additionalInfo; | |
| public final String name; | |
| public final SecurityIdentityType type; |
| package com.coveo.pushapiclient; | ||
|
|
||
| public class SecurityIdentityAliasModel extends SecurityIdentityModelBase { | ||
| public AliasMapping[] mappings; |
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.
After initializing the variable, you never change its values. You should therefore transcribe that behaviour semantically with the final keyword. It can help the JVM and thus increase the performance.
| public AliasMapping[] mappings; | |
| public final AliasMapping[] mappings; |
| public String fileId; | ||
| public Long orderingId; |
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.
After initializing those variables, you never change their values. You should therefore transcribe that behaviour semantically with the final keyword. It can help the JVM and thus increase the performance.
| public String fileId; | |
| public Long orderingId; | |
| public final String fileId; | |
| public final Long orderingId; |
| package com.coveo.pushapiclient; | ||
|
|
||
| public class SecurityIdentityDelete { | ||
| public IdentityModel identity; | ||
|
|
||
| public SecurityIdentityDelete(IdentityModel identity) { | ||
| this.identity = identity; | ||
| } | ||
| } |
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.
What's the goal of this class?
It doesn't seem to me to do anything meaningful
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.
It's just a data class. It is ultimately just serialized in JSON.
Used for source.deleteSecurityIdentity
| public Integer queueDelay; | ||
| public Long orderingId; |
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.
After initializing those variables, you never change their values. You should therefore transcribe that behaviour semantically with the final keyword. It can help the JVM and thus increase the performance.
| public Integer queueDelay; | |
| public Long orderingId; | |
| public final Integer queueDelay; | |
| public final Long orderingId; |
| package com.coveo.pushapiclient; | ||
|
|
||
| public class SecurityIdentityModel extends SecurityIdentityModelBase { | ||
| public IdentityModel[] members; |
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.
After initializing the variable, you never change itsvalue. You should therefore transcribe that behaviour semantically with the final keyword. It can help the JVM and thus increase the performance.
| public IdentityModel[] members; | |
| public final IdentityModel[] members; |
| public IdentityModel identity; | ||
| public IdentityModel[] wellKnowns; |
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.
After initializing those variables, you never change their values. You should therefore transcribe that behaviour semantically with the final keyword. It can help the JVM and thus increase the performance.
| public IdentityModel identity; | |
| public IdentityModel[] wellKnowns; | |
| public final IdentityModel identity; | |
| public final IdentityModel[] wellKnowns; |
Repetition of what was done for previous clients in other languages.
https://coveord.atlassian.net/browse/CDX-386