mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-01 01:55:59 +01:00
Fix Android compatibility by using Matcher.group(int) instead of Matcher.group(String)
This commit is contained in:
parent
94851ccb8f
commit
75f69c0473
1 changed files with 3 additions and 3 deletions
|
@ -92,9 +92,9 @@ public final class UserId implements CharSequence {
|
|||
string = string.trim();
|
||||
Matcher matcher = nameAddrPattern.matcher(string);
|
||||
if (matcher.find()) {
|
||||
String name = matcher.group("name");
|
||||
String comment = matcher.group("comment");
|
||||
String mail = matcher.group("email");
|
||||
String name = matcher.group(2);
|
||||
String comment = matcher.group(4);
|
||||
String mail = matcher.group(6);
|
||||
matcher = emailPattern.matcher(mail);
|
||||
if (!matcher.matches()) {
|
||||
throw new IllegalArgumentException("Malformed email address");
|
||||
|
|
Loading…
Reference in a new issue