Skip to content
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

commit #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

commit #12

wants to merge 3 commits into from

Conversation

shaileshexp
Copy link

No description provided.

Copy link
Owner

@kanmaytacker kanmaytacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @shaileshexp.
A couple of things apart from the comments:

  1. You have missed implementing the Registry pattern in the prototype question.
  2. Try to take a pull from the master branch. It should remove the unrelated changes.
  3. Update the name of this pull request. The name of a pull request should tell me what is present in it.

@@ -55,6 +56,9 @@ protected <T> T convert(String value, Class<T> type) {
return (T) Float.valueOf(value);
case "Double":
return (T) Double.valueOf(value);
}}
catch (Exception e){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, but not sure the calling method how to handle it?

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;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MINOR] You can use the @Getter annotation here as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented the review comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants