Skip to content

Commit

Permalink
added edits from ai
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleh Ridchenko committed Nov 27, 2024
1 parent 3fb3062 commit a926f6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/practice/CandidateValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public class CandidateValidator implements Predicate<Candidate> {

@Override
public boolean test(Candidate candidate) {
int formYearInUkraine = Integer.parseInt(candidate.getPeriodsInUkr().split("-")[0]);
int fromYearInUkraine = Integer.parseInt(candidate.getPeriodsInUkr().split("-")[0]);
int toYearInUkraine = Integer.parseInt(candidate.getPeriodsInUkr().split("-")[1]);
int amountOfYearInUkraine = toYearInUkraine - formYearInUkraine;
int amountOfYearInUkraine = toYearInUkraine - fromYearInUkraine;

return candidate.getAge() >= VALID_AGE
&& candidate.isAllowedToVote()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/practice/StreamPractice.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public int findMinEvenNumber(List<String> numbers) {
.boxed()
.min(Comparator.naturalOrder())
.orElseThrow(() -> new RuntimeException("Can't get min value from list: "
+ "< Here is our input 'numbers' >"));
+ numbers));

}

Expand Down

0 comments on commit a926f6e

Please sign in to comment.