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

Print a warning when getID() is called on a node before being added to the topology #113

Open
acasteigts opened this issue Dec 16, 2021 · 0 comments

Comments

@acasteigts
Copy link
Member

acasteigts commented Dec 16, 2021

Nodes receive their IDs only when they are added to the Topology. It often occurs that an algorithm tries to consult this value in the constructor of the Node, rather than (say) in onStart(). The former does not work, but latter does work, since onStart() may execute only after a node has been added to a Topology (and thus has its ID). The programmer could be hinted to this direction, as it makes no sense to call getID() from the constructor.

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