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

create HW #1157

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

create HW #1157

wants to merge 3 commits into from

Conversation

jekaGr
Copy link

@jekaGr jekaGr commented Dec 22, 2024

No description provided.

Copy link

@sarakhmen sarakhmen left a comment

Choose a reason for hiding this comment

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

let's slightly improve your solution ;)

Comment on lines 19 to 24
if (user == null) {
return false;
} else if (user.getPassword().equals(password)) {
return true;
}
return false;

Choose a reason for hiding this comment

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

please use ternary operator instead

Comment on lines 10 to 17
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Build with Maven

Choose a reason for hiding this comment

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

do not change CI files yourself

@jekaGr jekaGr requested a review from sarakhmen December 22, 2024 15:43
Comment on lines 19 to 25
if (user == null) {
return false;
} else if (user.getPassword().equals(password)) {
return true;
} else {
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;
} else if (user.getPassword().equals(password)) {
return true;
} else {
return false;
}
return user != null && user.getPassword().equals(password);

@jekaGr jekaGr requested a review from Elena-Bruyako December 23, 2024 13:40
Copy link

@ahoienko ahoienko left a comment

Choose a reason for hiding this comment

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

Good job!

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.

5 participants