url = URLUtil.normalizeURL(url);
if (url == null || (defaultTarget != null && url.equals(defaultTarget.getCloud().getUrl()))) {
return defaultTarget != null ? defaultTarget.getCloud() : null;
}
Cloud cloud = userCloudMap.get(url);
if (cloud == null) {
CFExtServiceHelper helper = CFExtServiceHelper.getDefault();
if (helper != null && helper.getService() != null) {
Cloud someCloud = helper.getService().getClouds().get(url);
if (someCloud != null) {
cloud = new DarkCloud(someCloud, userId);
}
}
if (cloud == null) {
Cloud someCloud = getConfigCloud();
if (someCloud != null && someCloud.getUrl().equals(url)) {
cloud = someCloud;
} else {
cloud = new DarkCloud(url, null, this.userId);
}
}