Skip to content

Commit

Permalink
Merge pull request #98 from KUSITMS-27th-TEAM3/feat/user
Browse files Browse the repository at this point in the history
[Fix] mypet petAge 값에 0보닀 큰 숫자 μ΄μ™Έμ˜ 값이 μž…λ ₯되면 반영 μ•ˆλ˜λ„λ‘ μˆ˜μ •
  • Loading branch information
tlarbals824 authored May 25, 2023
2 parents 7772051 + a6cc9d3 commit 9aae2fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ private int petAgeParse(String petAge) {
try{
return Integer.parseInt(petAge);
}catch (NumberFormatException e){
return 0;
return -1;
}
}
return 0;
return -1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void updateDescription(String description) {
}

private void updatePetAge(int petAge) {
if (!Objects.equals(petAge, this.petAge))
if (!Objects.equals(petAge, this.petAge)&&petAge>=0)
this.petAge = petAge;
}

Expand Down

0 comments on commit 9aae2fc

Please sign in to comment.