-
Notifications
You must be signed in to change notification settings - Fork 948
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
fixed problem with AuthenticationService and UserService #900
base: master
Are you sure you want to change the base?
Conversation
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.
left a few comments
new User("[email protected]", "1234") | ||
}; | ||
new User("[email protected]", "1234")}; | ||
private User foundUser; |
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.
useless variable
private User foundUser; |
return null; | ||
for (User user : users) { | ||
if (user.getEmail().equals(email)) { | ||
foundUser = user; |
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.
foundUser = user; | |
return user; |
foundUser = user; | ||
} | ||
} | ||
return foundUser; |
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.
return foundUser; | |
return null; |
if (userService.findByEmail(email).getEmail().equals(email) | ||
&& userService.findByEmail(email).getPassword().equals(password)) { | ||
return true; | ||
} else { | ||
return false; | ||
} |
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.
redundant operation
if (userService.findByEmail(email).getEmail().equals(email) | |
&& userService.findByEmail(email).getPassword().equals(password)) { | |
return true; | |
} else { | |
return false; | |
} | |
User user = userService.findByEmail(email); | |
return user != null && user.getPassword().equals(password); |
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.
Good job
No description provided.