Skip to content

commit#12

Open
shaileshexp wants to merge 3 commits intokanmaytacker:masterfrom
shaileshexp:master
Open

commit#12
shaileshexp wants to merge 3 commits intokanmaytacker:masterfrom
shaileshexp:master

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.

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