mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 19:08:00 +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();
|
string = string.trim();
|
||||||
Matcher matcher = nameAddrPattern.matcher(string);
|
Matcher matcher = nameAddrPattern.matcher(string);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
String name = matcher.group("name");
|
String name = matcher.group(2);
|
||||||
String comment = matcher.group("comment");
|
String comment = matcher.group(4);
|
||||||
String mail = matcher.group("email");
|
String mail = matcher.group(6);
|
||||||
matcher = emailPattern.matcher(mail);
|
matcher = emailPattern.matcher(mail);
|
||||||
if (!matcher.matches()) {
|
if (!matcher.matches()) {
|
||||||
throw new IllegalArgumentException("Malformed email address");
|
throw new IllegalArgumentException("Malformed email address");
|
||||||
|
|
Loading…
Reference in a new issue