Skip to content

Commit

Permalink
improve isTrackIdValid check
Browse files Browse the repository at this point in the history
  • Loading branch information
LabyStudio committed Jan 8, 2024
1 parent 4d64626 commit c93d6ea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ public long getAddressTrackId() {
*/
public boolean isTrackIdValid(String trackId) {
for (char c : trackId.toCharArray()) {
if (!Character.isLetterOrDigit(c)) {
boolean isValidCharacter = c >= 'a' && c <= 'z'
|| c >= 'A' && c <= 'Z'
|| c >= '0' && c <= '9';
if (!isValidCharacter) {
return false;
}
}
Expand Down

0 comments on commit c93d6ea

Please sign in to comment.