Conversation
louis-bompart
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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.
What's the goal of this class?
It doesn't seem to me to do anything meaningful
There was a problem hiding this comment.
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.
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.
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.
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