Open
Conversation
kanmaytacker
requested changes
Sep 18, 2023
Owner
There was a problem hiding this comment.
Great work @shaileshexp.
A couple of things apart from the comments:
- You have missed implementing the Registry pattern in the prototype question.
- Try to take a pull from the master branch. It should remove the unrelated changes.
- Update the name of this pull request. The name of a pull request should tell me what is present in it.
...main/java/com/scaler/lld/design/assignments/singleton/FileBasedConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
| case "Double": | ||
| return (T) Double.valueOf(value); | ||
| }} | ||
| catch (Exception e){ |
Owner
There was a problem hiding this comment.
Never catch a generic exception. This catch block can be triggered for multiple reasons instead of NPE such as a class cast exception, etc. Rather than catching the null pointer exception, add a validation as I have mentioned below.
Author
There was a problem hiding this comment.
done, but not sure the calling method how to handle it?
src/main/java/com/scaler/lld/design/assignments/builder/DatabaseConfigurationBuilder.java
Outdated
Show resolved
Hide resolved
Comment on lines
+17
to
+39
| public String getDatabaseUrl() { | ||
| return databaseUrl; | ||
| } | ||
|
|
||
| public String getUsername() { | ||
| return username; | ||
| } | ||
|
|
||
| public String getPassword() { | ||
| return password; | ||
| } | ||
|
|
||
| public int getMaxConnections() { | ||
| return maxConnections; | ||
| } | ||
|
|
||
| public boolean isEnableCache() { | ||
| return enableCache; | ||
| } | ||
|
|
||
| public boolean isReadOnly() { | ||
| return isReadOnly; | ||
| } |
Owner
There was a problem hiding this comment.
[MINOR] You can use the @Getter annotation here as well.
shaileshexp
commented
Sep 19, 2023
Author
There was a problem hiding this comment.
implemented the review comments
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.
No description provided.