RM-6355 Fix null pointer

(cherry picked from commit d22fc1f6ad7d0761e47931056328570e17a46f54)
This commit is contained in:
Sara Aspery
2018-07-24 10:54:24 +01:00
committed by Rodica Sutu
parent b6562142d1
commit 8fba7aa3f9

View File

@@ -188,8 +188,16 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
RegistryKey moduleKeyVersion = new RegistryKey(ModuleComponentHelper.URI_MODULES_1_0,
new String[]{REGISTRY_PATH_MODULES, moduleId, registryProperty});
Serializable moduleVersion = this.registryService.getProperty(moduleKeyVersion);
return new ModuleVersionNumber(moduleVersion.toString());
if (moduleVersion == null)
{
return VERSION_ZERO;
}
else
{
return new ModuleVersionNumber(moduleVersion.toString());
}
}
/**