-
Notifications
You must be signed in to change notification settings - Fork 266
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
Trie tech debts #1655
Labels
Comments
fedejinich
changed the title
useless get() method in Trie class
Test methods in Trie class
Nov 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are many tech debts in the Trie class, I've spotted some of them
Test code in production
There are two overloads for
get()
andput()
methods that are only used in test cases, those methods should be removed in order to clean test code from production.Unecesary overloads
getNodes()
There are many overloads for the
getNodes()
method, to me, this doesn't add any real value, in most cases, those conversions are just a simpleTrie.fromKey(key)
. To simplify theTrie
class, I propose only to leave the defaultfindNodes()
implementation, but if you push me, I think we should extract this method to theMutableTrie
implementation (where we should do most of the trie manipulations).Trie Constructor Overload
This overload it's unnecessary since the node stopper it's always initialized with
System.exit(exitStatus)
. I propose to delegate that part into the full constructorThe text was updated successfully, but these errors were encountered: