/** * Compares this object with another one. * * @param obj an object to compare with * @return <span class="javakeyword">true</span> if <code>obj</code> * is an instance of <b>SVNURL</b> and has got the same * url components as this object has */ public boolean equals(Object obj) { if (obj == null || obj.getClass() != SVNURL.class) { return false; } SVNURL url = (SVNURL) obj; boolean eq = myProtocol.equals(url.myProtocol) && myPort == url.myPort && myHost.equals(url.myHost) && myPath.equals(url.myPath) && hasPort() == url.hasPort(); if (myUserName == null) { eq &= url.myUserName == null; } else { eq &= myUserName.equals(url.myUserName); } return eq; }
/** * Compares this object with another one. * * @param obj an object to compare with * @return <span class="javakeyword">true</span> if <code>obj</code> * is an instance of <b>SVNURL</b> and has got the same * url components as this object has */ public boolean equals(Object obj) { if (obj == null || obj.getClass() != SVNURL.class) { return false; } SVNURL url = (SVNURL) obj; boolean eq = myProtocol.equals(url.myProtocol) && myPort == url.myPort && myHost.equals(url.myHost) && myPath.equals(url.myPath) && hasPort() == url.hasPort(); if (myUserName == null) { eq &= url.myUserName == null; } else { eq &= myUserName.equals(url.myUserName); } return eq; }
/** * Compares this object with another one. * * @param obj an object to compare with * @return <span class="javakeyword">true</span> if <code>obj</code> * is an instance of <b>SVNURL</b> and has got the same * url components as this object has */ public boolean equals(Object obj) { if (obj == null || obj.getClass() != SVNURL.class) { return false; } SVNURL url = (SVNURL) obj; boolean eq = myProtocol.equals(url.myProtocol) && myPort == url.myPort && myHost.equals(url.myHost) && myPath.equals(url.myPath) && hasPort() == url.hasPort(); if (myUserName == null) { eq &= url.myUserName == null; } else { eq &= myUserName.equals(url.myUserName); } return eq; }
/** * Compares this object with another one. * * @param obj an object to compare with * @return <span class="javakeyword">true</span> if <code>obj</code> * is an instance of <b>SVNURL</b> and has got the same * url components as this object has */ public boolean equals(Object obj) { if (obj == null || obj.getClass() != SVNURL.class) { return false; } SVNURL url = (SVNURL) obj; boolean eq = myProtocol.equals(url.myProtocol) && myPort == url.myPort && myHost.equals(url.myHost) && myPath.equals(url.myPath) && hasPort() == url.hasPort(); if (myUserName == null) { eq &= url.myUserName == null; } else { eq &= myUserName.equals(url.myUserName); } return eq; }
@Override public URI getUri() { SVNURL svnurl; svnurl = getSvnurl(); try { svnurl = SVNURL.create(svnurl.getProtocol(), null, svnurl.getHost(), svnurl.hasPort() ? svnurl.getPort() : -1, svnurl.getPath(), false); } catch (SVNException e) { throw new IllegalStateException(e.getMessage(), e); } return URI.create(root.getFilesystem().getScheme() + ":" + svnurl.toString()); }
public static SVNURL canonicalizeURL(SVNURL url, boolean omitDefaultPort) throws SVNException { if (url == null || url.getPort() <= 0) { return null; } int defaultPort = SVNURL.getDefaultPortNumber(url.getProtocol()); if (defaultPort <= 0) { return null; } if (omitDefaultPort) { if (url.hasPort() && url.getPort() == defaultPort) { return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), -1, url.getPath(), false); } } else if (!url.hasPort()) { return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), false); } return null; }
private static SVNURL canonicalizeURL(SVNURL url, boolean omitDefaultPort) throws SVNException { if (url == null || url.getPort() <= 0) { // no url or file url. return null; } int defaultPort = SVNURL.getDefaultPortNumber(url.getProtocol()); if (defaultPort <= 0) { // file or svn+ext URL. return null; } if (omitDefaultPort) { // remove port if it is same as default. if (url.hasPort() && url.getPort() == defaultPort) { return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), -1, url.getPath(), false); } } else if (!url.hasPort()) { // set port if there is no port set. return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), false); } return null; }
private static SVNURL canonicalizeURL(SVNURL url, boolean omitDefaultPort) throws SVNException { if (url == null || url.getPort() <= 0) { // no url or file url. return null; } int defaultPort = SVNURL.getDefaultPortNumber(url.getProtocol()); if (defaultPort <= 0) { // file or svn+ext URL. return null; } if (omitDefaultPort) { // remove port if it is same as default. if (url.hasPort() && url.getPort() == defaultPort) { return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), -1, url.getPath(), false); } } else if (!url.hasPort()) { // set port if there is no port set. return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), false); } return null; }
private static SVNURL canonicalizeURL(SVNURL url, boolean omitDefaultPort) throws SVNException { if (url == null || url.getPort() <= 0) { // no url or file url. return null; } int defaultPort = SVNURL.getDefaultPortNumber(url.getProtocol()); if (defaultPort <= 0) { // file or svn+ext URL. return null; } if (omitDefaultPort) { // remove port if it is same as default. if (url.hasPort() && url.getPort() == defaultPort) { return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), -1, url.getPath(), false); } } else if (!url.hasPort()) { // set port if there is no port set. return SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), false); } return null; }
SVNErrorManager.error(error, SVNLogType.NETWORK); int port = location.hasPort() ? location.getPort() : credentials.getPortNumber(); if (port < 0) { port = 22;
SVNErrorManager.error(error, SVNLogType.NETWORK); int port = location.hasPort() ? location.getPort() : credentials.getPortNumber(); if (port < 0) { port = 22;
SVNErrorManager.error(error); int port = location.hasPort() ? location.getPort() : credentials.getPortNumber(); if (port < 0) { port = 22;
if (repository.getLocation().hasPort()) { realm += ":" + repository.getLocation().getPort();
if (repository.getLocation().hasPort()) { realm += ":" + repository.getLocation().getPort();
if (repository.getLocation().hasPort()) { realm += ":" + repository.getLocation().getPort(); final ISVNSSHHostVerifier verifier = (ISVNSSHHostVerifier) (authManager instanceof ISVNSSHHostVerifier ? authManager : null); String host = repository.getLocation().getHost(); int port = repository.getLocation().hasPort() ? repository.getLocation().getPort() : authentication.getPortNumber(); if (port < 0) { port = 22;
if (repository.getLocation().hasPort()) { realm += ":" + repository.getLocation().getPort();