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 4211d4bd8a
commit 56c1038774

View File

@@ -189,9 +189,17 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
new String[]{REGISTRY_PATH_MODULES, moduleId, registryProperty});
Serializable moduleVersion = this.registryService.getProperty(moduleKeyVersion);
if (moduleVersion == null)
{
return VERSION_ZERO;
}
else
{
return new ModuleVersionNumber(moduleVersion.toString());
}
}
/**
* Helper method to determine if this is an upgrade from a version that already includes the early (v2.0, v2.1)
* patches.