mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
REPO-2516 - MNT-17845: Added a null check on the noderef
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137796 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -115,6 +115,8 @@ public class Reference
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static final Reference fromNodeRef(NodeRef nodeRef)
|
public static final Reference fromNodeRef(NodeRef nodeRef)
|
||||||
|
{
|
||||||
|
if (nodeRef != null)
|
||||||
{
|
{
|
||||||
String id = nodeRef.getId();
|
String id = nodeRef.getId();
|
||||||
if (id.startsWith("" + VIRTUAL_TOKEN) && (id.length() > 1)) // belts-and-braces
|
if (id.startsWith("" + VIRTUAL_TOKEN) && (id.length() > 1)) // belts-and-braces
|
||||||
@@ -143,7 +145,7 @@ public class Reference
|
|||||||
logger.debug("Encoding exception:", ree);
|
logger.debug("Encoding exception:", ree);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user