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

Develop #1117

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

Develop #1117

wants to merge 2 commits into from

Conversation

oKukHtina
Copy link

No description provided.

public class AuthenticationService {
private final UserService userService = new UserService();
Copy link

Choose a reason for hiding this comment

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

It's better to use a constructor

Comment on lines +19 to 24

if (user != null) {
return user.getPassword().equals(password);
}

return false;
Copy link

Choose a reason for hiding this comment

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

You can simplify it by making one return statement:
return user != null && user.getPassword().equals(password);

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