String[] parts = getVersionParts(version);
if (!OSGiVersion.isValid(parts[1])) {
//ok the user supplied something that isn't an OSGi version.
//We can't accept that.
throw new PackageDetailsValidationException("The version part of '" + version + "' isn't an OSGi version string.");
}
return userName + ":" + parts[1];
}