diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java index 3e52c00226..8b34004e6c 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java @@ -122,10 +122,10 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin private static final String MSG_ERROR_SPLIT_ID = "rm.admin.error-split-id"; /** Constants */ - public static final String RMC_CUSTOM_ASSOCS = RecordsManagementCustomModel.RM_CUSTOM_PREFIX + ":customAssocs"; + public static final String RMC_CUSTOM_ASSOCS = RecordsManagementCustomModel.RM_CUSTOM_PREFIX + ":customAssocs"; private static final String CUSTOM_CONSTRAINT_TYPE = org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.class.getName(); private static final String CAPATIBILITY_CUSTOM_CONTRAINT_TYPE = org.alfresco.module.org_alfresco_module_dod5015.caveat.RMListOfValuesConstraint.class.getName(); - private static final NodeRef RM_CUSTOM_MODEL_NODE_REF = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, "records_management_custom_model"); + private static final NodeRef RM_CUSTOM_MODEL_NODE_REF = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, "records_management_custom_model"); private static final String PARAM_ALLOWED_VALUES = "allowedValues"; private static final String PARAM_CASE_SENSITIVE = "caseSensitive"; private static final String PARAM_MATCH_LOGIC = "matchLogic"; @@ -816,8 +816,8 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin QName newPropQName = getQNameForClientId(newName); if (newPropQName != null) { - propDefn = dictionaryService.getProperty(newPropQName); - if (propDefn != null) + PropertyDefinition newPropDefn = dictionaryService.getProperty(newPropQName); + if (newPropDefn != null && propDefn.equals(newPropDefn) == false) { // The requested QName is already in use String propIdAsString = newPropQName.toPrefixString(namespaceService); @@ -1415,7 +1415,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin } String type = customConstraint.getType(); - if (type == null || + if (type == null || (type.equals(CUSTOM_CONSTRAINT_TYPE) == false && type.equals(CAPATIBILITY_CUSTOM_CONTRAINT_TYPE) == false)) { diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPut.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPut.java index 40baefa5e9..d7a7eb05a0 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPut.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPut.java @@ -190,7 +190,7 @@ public class CustomPropertyDefinitionPut extends BaseCustomPropertyWebScript return result; } - + @SuppressWarnings("unchecked") protected Map getParamsFromUrlAndJson(WebScriptRequest req, JSONObject json) throws JSONException @@ -205,9 +205,9 @@ public class CustomPropertyDefinitionPut extends BaseCustomPropertyWebScript params.put(PROP_ID, (Serializable)propId); } - for (Iterator iter = json.keys(); iter.hasNext(); ) + for (Iterator iter = json.keys(); iter.hasNext(); ) { - String nextKeyString = (String)iter.next(); + String nextKeyString = iter.next(); String nextValueString = null; if (!json.isNull(nextKeyString)) {