|
@@ -24,11 +24,12 @@ package com.dmdirc.addons.ui_swing;
|
24
|
24
|
|
25
|
25
|
import com.dmdirc.ServerManager;
|
26
|
26
|
import com.dmdirc.addons.ui_swing.components.menubar.MenuBar;
|
27
|
|
-import com.dmdirc.commandparser.commands.global.NewServer;
|
28
|
27
|
import com.dmdirc.events.ClientOpenedEvent;
|
29
|
28
|
import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
30
|
29
|
import com.dmdirc.logger.ErrorLevel;
|
31
|
30
|
import com.dmdirc.logger.Logger;
|
|
31
|
+import com.dmdirc.util.InvalidURIException;
|
|
32
|
+import com.dmdirc.util.URIParser;
|
32
|
33
|
|
33
|
34
|
import com.google.common.eventbus.EventBus;
|
34
|
35
|
import com.google.common.eventbus.Subscribe;
|
|
@@ -41,7 +42,6 @@ import java.lang.reflect.InvocationTargetException;
|
41
|
42
|
import java.lang.reflect.Method;
|
42
|
43
|
import java.lang.reflect.Proxy;
|
43
|
44
|
import java.net.URI;
|
44
|
|
-import java.net.URISyntaxException;
|
45
|
45
|
import java.util.ArrayList;
|
46
|
46
|
import java.util.EventObject;
|
47
|
47
|
import java.util.List;
|
|
@@ -74,7 +74,8 @@ public class Apple implements InvocationHandler {
|
74
|
74
|
/**
|
75
|
75
|
* Creates a new instance of {@link Apple}.
|
76
|
76
|
*
|
77
|
|
- * <p>This will attempt to load the native library and register the URL open callback.
|
|
77
|
+ * <p>
|
|
78
|
+ * This will attempt to load the native library and register the URL open callback.
|
78
|
79
|
*
|
79
|
80
|
* @param configManager Config manager
|
80
|
81
|
* @param serverManager The server manager to use to connect to URLs.
|
|
@@ -467,8 +468,9 @@ public class Apple implements InvocationHandler {
|
467
|
468
|
*/
|
468
|
469
|
public void handleOpenURL(final String url) {
|
469
|
470
|
try {
|
470
|
|
- handleURI(NewServer.getURI(url));
|
471
|
|
- } catch (final URISyntaxException use) {
|
|
471
|
+ handleURI(new URIParser().parseFromText(url));
|
|
472
|
+ } catch (final InvalidURIException ex) {
|
|
473
|
+ // Do nothing?...
|
472
|
474
|
}
|
473
|
475
|
}
|
474
|
476
|
|