Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

60652: Precautions against MNT-10486: NPE in NodeEntity during post-commit write through to shared cache
    - Ensure that NodeEntity objects are locked before going into cache (missed locks during bulk loading)
    - Do check on validity of NodeEntity during lock


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62355 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-12 14:31:36 +00:00
parent c7ed0857ae
commit 32b92eb51b
2 changed files with 8 additions and 0 deletions

View File

@@ -150,6 +150,11 @@ public class NodeEntity implements Node, PermissionCheckValue, Serializable
{
auditableProperties.lock();
}
// Help to avoid NPEs e.g. MNT-10486: NPE in NodeEntity during post-commit write through to shared cache
if (id == null || version == null)
{
throw new IllegalStateException("The NodeEntity has not be filled: " + this);
}
}
private synchronized final void checkLock()