-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor NullNode and remove NullLeafNode class #73
Refactor NullNode and remove NullLeafNode class #73
Conversation
Signed-off-by: Luis Pinto <[email protected]> Remove NullLeafNode and use NullNode instead Signed-off-by: Luis Pinto <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just added small comments
return isLeaf() ? "NullLeafNode" : "NullNode"; | ||
} | ||
|
||
@SuppressWarnings("rawtypes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for NullNode class maybe better to have the @SuppressWarnings directly for the class ? and not for each method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we make it class wide then other accept
methods might not report relevant warnings and they could be useful. I prefer to keep it locally to where we actually need to disable them
return nullLeafNode; | ||
} | ||
|
||
public static <T> NullNode<T> nullLeafNode(Optional<T> previousValue) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better to rename the method to createNullLeafNode or newNullLeafNode
rename nullLeafNode to newNullLeafNode in NullNode Signed-off-by: Luis Pinto <[email protected]>
Remove NullLeafNode and use NullNode instead