Fixes PatternSyntaxException when dialing numbers containing '+'.

cusax-fix
Damian Minkov 13 years ago
parent 35838c7a1e
commit 97030f17c4

@ -3692,7 +3692,8 @@ private static String resolveContactSource(String peerAddress)
(index > -1) ? peerAddress.substring(0, index) : peerAddress;
// searches for the whole number/username or with the @serverpart
Pattern p = Pattern.compile(
peerUserID = Pattern.quote(peerUserID);
Pattern pattern = Pattern.compile(
"^(" + peerUserID + "|" + peerUserID + "@.*)$");
// Queries all available resolvers
@ -3706,7 +3707,7 @@ private static String resolveContactSource(String peerAddress)
// use the pattern method of (ExtendedContactSourceService)
ContactQuery query
= ((ExtendedContactSourceService)contactSourceService)
.queryContactSource(p);
.queryContactSource(pattern);
resolvers.add(
new ResolveAddressToDisplayNameContactQueryListener(

Loading…
Cancel
Save