-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Solves #404 Refactor dao #407
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
Conversation
…n to InMemory and refined interface
…archical junit runner in parent pom
@iluwatar Please go through the changes. I have changed test cases a bit to use my style of unit testing. The method names are verbose and communicate the behavior under test. |
dao/pom.xml
Outdated
<dependency> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
<scope>compile</scope> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compile
is the default scope so no need to define it
Review remarks:
|
@npathai you've got my review comments. |
|
@iluwatar Well after a lot of opinion reading I decided that for the sake of keeping interface fuctional ready, I will change the return type to be Optional. But in reality I dont hate nulls. If documented correctly they are not a problem. Also creating an optional wrapper creates unnecessary GC pressure if the operation is heavily used. |
Changed getById return type to Optional
@iluwatar Done with the changes. |
@npathai these are great improvements 👍 |
List of changes:
CustomerDao
interface.DbCustomerDao
andInMemoryCustomerDao
.CustomerDaoImpl
is renamed toInMemoryCustomerDao
.DbCustomerDao
.