comparison src/org/tmatesoft/hg/internal/remote/RemoteConnectorDescriptor.java @ 702:992fa84e7885

Reference ssh-dependant class by the fq name to avoid runtime dependency from the ssh library
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 08 Aug 2013 21:32:22 +0200
parents a483b2b68a2e
children
comparison
equal deleted inserted replaced
701:02766745dbe6 702:992fa84e7885
82 82
83 { 83 {
84 final ClassLoader cl = Provider.class.getClassLoader(); 84 final ClassLoader cl = Provider.class.getClassLoader();
85 knownConnectors.put("http", new Pair<ClassLoader, String>(cl, HttpConnector.class.getName())); 85 knownConnectors.put("http", new Pair<ClassLoader, String>(cl, HttpConnector.class.getName()));
86 knownConnectors.put("https", new Pair<ClassLoader, String>(cl, HttpConnector.class.getName())); 86 knownConnectors.put("https", new Pair<ClassLoader, String>(cl, HttpConnector.class.getName()));
87 // FIXME replace SshConnector.class with fqn string to avoid dependency from the trilead library in runtime 87 knownConnectors.put("ssh", new Pair<ClassLoader, String>(cl, "org.tmatesoft.hg.internal.remote.SshConnector"));
88 knownConnectors.put("ssh", new Pair<ClassLoader, String>(cl, SshConnector.class.getName()));
89 } 88 }
90 89
91 public HgRemoteRepository.RemoteDescriptor get(SessionContext ctx, URI uri) { 90 public HgRemoteRepository.RemoteDescriptor get(SessionContext ctx, URI uri) {
92 if (knownConnectors.containsKey(uri.getScheme())) { 91 if (knownConnectors.containsKey(uri.getScheme())) {
93 return new RemoteConnectorDescriptor(knownConnectors, uri); 92 return new RemoteConnectorDescriptor(knownConnectors, uri);