|
4 | 4 | * and Eclipse Distribution License v1.0 which accompany this distribution. |
5 | 5 | * |
6 | 6 | * The Eclipse Public License is available at |
7 | | - * http://www.eclipse.org/legal/epl-v10.html |
| 7 | + * http://www.eclipse.org/legal/epl-v10.html |
8 | 8 | * and the Eclipse Distribution License is available at |
9 | | - * http://www.eclipse.org/org/documents/edl-v10.php. |
| 9 | + * http://www.eclipse.org/org/documents/edl-v10.php. |
10 | 10 | */ |
11 | 11 | package org.eclipse.paho.client.mqttv3.internal; |
12 | 12 |
|
@@ -34,7 +34,7 @@ public class NetworkModuleService { |
34 | 34 | private static final Logger LOG = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, |
35 | 35 | NetworkModuleService.class.getSimpleName()); |
36 | 36 | private static final ServiceLoader<NetworkModuleFactory> FACTORY_SERVICE_LOADER = ServiceLoader.load( |
37 | | - NetworkModuleFactory.class); |
| 37 | + NetworkModuleFactory.class, NetworkModuleService.class.getClassLoader()); |
38 | 38 |
|
39 | 39 | /** Pattern to match URI authority parts: {@code authority = [userinfo"@"]host[":"port]} */ |
40 | 40 | private static final Pattern AUTHORITY_PATTERN = Pattern.compile("((.+)@)?([^:]*)(:(\\d+))?"); |
@@ -126,7 +126,7 @@ static void applyRFC3986AuthorityPatch(URI toPatch) { |
126 | 126 | return; |
127 | 127 | } |
128 | 128 | Matcher matcher = AUTHORITY_PATTERN.matcher(toPatch.getAuthority()); |
129 | | - if (matcher.matches()) { |
| 129 | + if (matcher.find()) { |
130 | 130 | setURIField(toPatch, "userInfo", matcher.group(AUTH_GROUP_USERINFO)); |
131 | 131 | setURIField(toPatch, "host", matcher.group(AUTH_GROUP_HOST)); |
132 | 132 | String portString = matcher.group(AUTH_GROUP_PORT); |
|
0 commit comments