code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit b0e244d0 authored by Sergey Shepelevich's avatar Sergey Shepelevich

REPO-1864 [Backport 11.2] getDisplayName() returns wrong value for virtual node

(Cherry picked from commit c59f8673)
parent 7399d1e5
......@@ -282,8 +282,11 @@ public class NodeDecorator extends org.hippoecm.repository.decorating.NodeDecora
@Override
public String getDisplayName() throws RepositoryException {
Node node = this;
if (!isNodeType(HippoNodeType.NT_NAMED)) {
Node parent = node.getParent();
if (!node.isNodeType(HippoNodeType.NT_NAMED)) {
if (node.equals(node.getSession().getRootNode())) {
return getName();
}
final Node parent = node.getParent();
if (parent.isNodeType(HippoNodeType.NT_HANDLE) && parent.isNodeType(HippoNodeType.NT_NAMED)) {
node = parent;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment