URL u = new URL(url);
String host = u.getHost();
int port = u.getPort() >= 0 ? u.getPort() : 21;
client = new FTPClient();
client.connect(host, port);
CredentialProvider cp = getCredentialProvider();
if (cp == null) {
client.login("anonymous", "anonymous");
} else {
client.login(cp.getUsername(), cp.getPassword());
}
return true;
} catch (MalformedURLException ex) {
mb.addErrorMessage("catalog.harvest.manage.test.err.HarvestInvalidUrl");
return false;