Remote Config Refactor Public and Response types - #481
Merged
Conversation
lahirumaramba
force-pushed
the
lm-refactor-parameter
branch
from
October 2, 2020 20:59
e205b62 to
7439447
Compare
lahirumaramba
force-pushed
the
lm-refactor-parameter
branch
from
October 2, 2020 21:00
7439447 to
daceb34
Compare
hiranya911
suggested changes
Oct 2, 2020
hiranya911
left a comment
Contributor
There was a problem hiding this comment.
Looks great. The new pattern is working out nicely. Just a few nits to clean up the code.
| parameters = new HashMap<>(); | ||
| } | ||
|
|
||
| protected RemoteConfigTemplate(@NonNull TemplateResponse templateResponse) { |
Contributor
There was a problem hiding this comment.
No access modifier to make it package-protected
| conditionalValues = new HashMap<>(); | ||
| } | ||
|
|
||
| protected RemoteConfigParameter(@NonNull ParameterResponse parameterResponse) { |
| return RemoteConfigParameterValue.inAppDefault(); | ||
| } | ||
| return RemoteConfigParameterValue.of(this.value); | ||
| public ParameterValueResponse setInAppDefaultValue(Boolean inAppDefaultValue) { |
Contributor
There was a problem hiding this comment.
Implement a setter that matches the getter you choose to implement.
Member
Author
There was a problem hiding this comment.
Should the getter take a boolean?
hiranya911
approved these changes
Oct 5, 2020
hiranya911
left a comment
Contributor
There was a problem hiding this comment.
LGTM with a suggestion.
| private ParameterValueResponse(String value, Boolean inAppDefaultValue) { | ||
| this.value = value; | ||
| this.inAppDefaultValue = inAppDefaultValue; | ||
| public Boolean getUseInAppDefault() { |
Contributor
There was a problem hiding this comment.
Is this used anywhere? If not lets remove it. And also change the setter to accept boolean so it matches the getter.
Member
Author
There was a problem hiding this comment.
Good call. Updated!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
publicandresponsetypesresponseDTOs to simple java beans (with getters and setters)protectedctorstopublictypes to initialize from the correspondingresponsetypesRelated to: #446