Fixed: when installation name present in URL, the deep link URL was parsed incorrectly.
diff --git a/bundles/org.eclipse.e4.core.deeplink/src/org/eclipse/e4/core/deeplink/internal/ParsedDeepLinkURL.java b/bundles/org.eclipse.e4.core.deeplink/src/org/eclipse/e4/core/deeplink/internal/ParsedDeepLinkURL.java index b0885f9..8daea58 100644 --- a/bundles/org.eclipse.e4.core.deeplink/src/org/eclipse/e4/core/deeplink/internal/ParsedDeepLinkURL.java +++ b/bundles/org.eclipse.e4.core.deeplink/src/org/eclipse/e4/core/deeplink/internal/ParsedDeepLinkURL.java
@@ -8,31 +8,31 @@ * Contributors: * David Orme - initial API and implementation ******************************************************************************/ -package org.eclipse.e4.core.deeplink.internal; - +package org.eclipse.e4.core.deeplink.internal; + import org.eclipse.e4.core.deeplink.DeepLinkURLException; - - -/** - * Parse a deeplink:// URL so that the installation and the rest of the URL - * can be processed separately. - */ -public class ParsedDeepLinkURL { - - private static final String PROTOCOL_STRING = "deeplink://"; - - public final String installation; - public final String restOfURL; - - public ParsedDeepLinkURL(String urlString) throws DeepLinkURLException { - if (!urlString.startsWith(PROTOCOL_STRING)) { - throw new DeepLinkURLException("Invalid deep link URL: " + urlString); - } - String urlWithoutProtocol = urlString.replace(PROTOCOL_STRING, "").trim(); - if (urlWithoutProtocol.length() < 1 || urlWithoutProtocol.startsWith("/")) { - throw new DeepLinkURLException("Invalid deep link URL: " + urlString); - } - installation = urlWithoutProtocol.split("/+")[0]; - restOfURL = urlWithoutProtocol.replace(installation, "").trim(); - } -} + + +/** + * Parse a deeplink:// URL so that the installation and the rest of the URL + * can be processed separately. + */ +public class ParsedDeepLinkURL { + + private static final String PROTOCOL_STRING = "deeplink://"; + + public final String installation; + public final String restOfURL; + + public ParsedDeepLinkURL(String urlString) throws DeepLinkURLException { + if (!urlString.startsWith(PROTOCOL_STRING)) { + throw new DeepLinkURLException("Invalid deep link URL: " + urlString); + } + String urlWithoutProtocol = urlString.replace(PROTOCOL_STRING, "").trim(); + if (urlWithoutProtocol.length() < 1 || urlWithoutProtocol.startsWith("/")) { + throw new DeepLinkURLException("Invalid deep link URL: " + urlString); + } + installation = urlWithoutProtocol.split("/+")[0]; + restOfURL = urlWithoutProtocol.replaceFirst(installation, "").trim(); + } +}