} else if (repositoryURL.startsWith(XML_SCHEME)) {
try {
deviceRepository = deviceRepositoryFactory.getDeviceRepository(
new URL(repositoryURL), unknownDevicesLogFileName);
} catch (MalformedURLException e) {
throw new DeviceRepositoryException(e.getMessage(), e);
}
} else {
String scheme = "null";
if(repositoryURL.indexOf(":")!=-1) {
scheme = repositoryURL.substring(0,
repositoryURL.indexOf(":"));
}
String args [] = {repositoryURL, scheme};
throw new DeviceRepositoryException(EXCEPTION_LOCALIZER.
format("device-repository-scheme-unsupported", args));
}
return deviceRepository;
}