Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a child of a node to its parent's value fails #177

Open
zml2008 opened this issue Oct 27, 2020 · 0 comments
Open

Setting a child of a node to its parent's value fails #177

zml2008 opened this issue Oct 27, 2020 · 0 comments
Assignees

Comments

@zml2008
Copy link
Member

zml2008 commented Oct 27, 2020

Given an operation such as:

void toList(final ConfigurationNode node) {
  if (!node.isList()) {
    node.appendListNode().from(node);
  }
}

what would be expected is for the contents of node to be moved into a new list child of the node.

What happens instead is something else -- and leads to attached, non-root nodes with a null value, which should not be possible. Initial attempts at changing where nodes are ensured attached in AbstractConfigurationNode.from were unsuccessful -- will need to look into this more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant