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

TreeMap#keyComparator fails if TreeMap has been created with TreeMap#ofAll #1418

Closed
goerge opened this issue Jul 6, 2016 · 1 comment
Closed
Assignees
Labels

Comments

@goerge
Copy link

goerge commented Jul 6, 2016

Following code fails

TreeMap.ofAll(Collections.singletonMap("key", "value")).keyComparator();

with

java.lang.ClassCastException: javaslang.collection.RedBlackTree$$Lambda$1/761960786 cannot be cast to javaslang.collection.TreeMap$EntryComparator

    at javaslang.collection.TreeMap.keyComparator(TreeMap.java:455)

Same error occurs when keySet() is called because keyComparator() is called inside.

@goerge goerge changed the title TreeMap#keySet fails if TreeMap has been created with TreeMap#ofAll TreeMap#keyComparator fails if TreeMap has been created with TreeMap#ofAll Jul 6, 2016
@danieldietrich danieldietrich added this to the 2.0.3 milestone Jul 7, 2016
@danieldietrich
Copy link
Contributor

Thank you!

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

No branches or pull requests

3 participants