The following document contains the results of PMD's CPD 4.2.5.
File | Line |
---|---|
info/magnolia/ui/form/field/transformer/item/FileTransformer.java | 253 |
info/magnolia/ui/form/field/transformer/multi/DelegatingMultiValueFieldTransformer.java | 204 |
} /** * Populates the given root item with its child items. */ protected void populateStoredChildItems(JcrNodeAdapter rootItem) { List<Node> childNodes = getStoredChildNodes(rootItem); for (Node child : childNodes) { JcrNodeAdapter item = new JcrNodeAdapter(child); item.setParent(rootItem); item.getParent().addChild(item); } } /** * Fetches child nodes of the given parent from JCR, filtered using the {@link NodeUtil#MAGNOLIA_FILTER} predicate. */ protected List<Node> getStoredChildNodes(JcrNodeAdapter parent) { try { if (!(parent instanceof JcrNewNodeAdapter) && parent.getJcrItem().hasNodes()) { return NodeUtil.asList(NodeUtil.getNodes(parent.getJcrItem(), NodeUtil.MAGNOLIA_FILTER)); } } catch (RepositoryException re) { log.warn("Not able to access the Child Nodes of the following Node Identifier {}", parent.getItemId(), re); } return new ArrayList<Node>(); } |