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

fix root command unregister #389

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

derklaro
Copy link
Contributor

The command unregistration process unregisters all command nodes from the backing tree based on all childs of a root command. As the Node#equals & Node#hashCode functions are only implemented based on the name of a node, unregistering a command which has (for example) the same literal argument name as a root node will cause the unregister process to remove the root node instead of the child from the parent node.

The root boolean which is now passed to the deleteRecursively method seems to be the safest way to check if the specified node should be unregistered from the root command tree, however checking if node.getParent == internalTree would do the job as well.

Unverified

This user has not yet uploaded their public signing key.
Copy link
Member

@Citymonstret Citymonstret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your contribution :)

@jpenilla jpenilla merged commit f1da897 into Incendo:1.8.0-dev Aug 26, 2022
jpenilla pushed a commit that referenced this pull request Aug 26, 2022
jpenilla pushed a commit that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants