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

Add new Method #1060

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

Add new Method #1060

wants to merge 4 commits into from

Conversation

Andormy
Copy link

@Andormy Andormy commented Jul 1, 2024

No description provided.

@@ -13,7 +13,15 @@ public String getEmail() {
return email;
}

public void setEmail(String email) {

Choose a reason for hiding this comment

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

remove

public String getPassword() {
return password;
}

public void setPassword(String password) {

Choose a reason for hiding this comment

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

remove

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

Choose a reason for hiding this comment

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

Suggested change
return user.getPassword().equals(password);
return user != null && user.getPassword().equals(password);

public boolean login(String email, String password) {
return false;
User user = userService.findByEmail(email);
if (user == null) {

Choose a reason for hiding this comment

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

Suggested change
if (user == null) {

Choose a reason for hiding this comment

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

not fixed

Choose a reason for hiding this comment

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

not fixed

Choose a reason for hiding this comment

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

you make this validation on 29th line, so this check is redundant

@Andormy Andormy requested a review from Elena-Bruyako July 9, 2024 01:48
public boolean login(String email, String password) {
return false;
User user = userService.findByEmail(email);
if (user == null) {

Choose a reason for hiding this comment

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

not fixed

Comment on lines 25 to 27
if (user == null) {
return false;
}

Choose a reason for hiding this comment

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

Suggested change
if (user == null) {
return false;
}

@Andormy Andormy requested a review from MentorMateAcademy July 9, 2024 13:19
public boolean login(String email, String password) {
return false;
User user = userService.findByEmail(email);
if (user == null) {

Choose a reason for hiding this comment

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

not fixed

public boolean login(String email, String password) {
return false;
User user = userService.findByEmail(email);
if (user == null) {

Choose a reason for hiding this comment

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

you make this validation on 29th line, so this check is redundant

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.

4 participants