-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
-
Empty show more show less
public Node getReferencedContent(Node content, String idPropertyName, String referencedWorkspace) { try { if (content.hasProperty(idPropertyName)) { String identifier = PropertyUtil.getString(content, idPropertyName); return wrap(NodeUtil.getNodeByIdentifier(referencedWorkspace, identifier)); } } catch (RepositoryException e) { log.error("can't read value '" + idPropertyName + "' of the Node '" + content.toString() + "'.", e); throw new RuntimeRepositoryException(e); } return null; }
I don't see any reason why this code shoud wrap RepositoryException and then throw it. There rather should be throws clause with RepositoryException so we can catche i.e. ItemNotFoundException if we need to.
Acceptance criteria