From 56c103877476d7fe6d4955fd8aa9c28e13b7647e Mon Sep 17 00:00:00 2001 From: Sara Aspery Date: Tue, 24 Jul 2018 10:54:24 +0100 Subject: [PATCH] RM-6355 Fix null pointer (cherry picked from commit d22fc1f6ad7d0761e47931056328570e17a46f54) --- .../patch/compatibility/ModulePatchComponent.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/compatibility/ModulePatchComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/compatibility/ModulePatchComponent.java index de5c99fadf..d9376a9fb6 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/compatibility/ModulePatchComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/compatibility/ModulePatchComponent.java @@ -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()); + } + } /**