Issue Type: Bug Bug
Assignee: Unassigned
Created: 17/Apr/13 12:11 PM
Description:
    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.

Fix Versions: 2.5
Project: Magnolia Standard Templating Kit
Priority: Major Major
Reporter: Jaroslav Simak
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to