Skip to content

Commit

Permalink
✨ refactor(UserRes.java): Simplify phone number masking logic for i…
Browse files Browse the repository at this point in the history
…mproved readability.
  • Loading branch information
vnobo committed Feb 27, 2025
1 parent c0dfe82 commit b328eaa
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public class UserRes extends User {
public String getPhone() {
String phone = super.getPhone();
return phone != null && phone.length() >= 7 ?
phone.replaceAll("(\\d{3})\\d{4}(\\d*)", "$1****$2") :
phone;
phone.replaceAll("(\\d{3})\\d{4}(\\d*)", "$1****$2") : phone;
}

@Override
Expand Down

0 comments on commit b328eaa

Please sign in to comment.