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

CollectionUtility.sortMapByValue方法在存在bug #1159

Closed
wyuz1028 opened this issue Apr 24, 2019 · 1 comment
Closed

CollectionUtility.sortMapByValue方法在存在bug #1159

wyuz1028 opened this issue Apr 24, 2019 · 1 comment
Labels

Comments

@wyuz1028
Copy link

v1.72版本存在bug,最新版master中依然存在
com.hankcs.hanlp.classification.utilities.CollectionUtility中
public static <K, V extends Comparable> Map<K, V> sortMapByValue(Map<K, V> input, final boolean desc)方法存在bug
ArrayList<Map.Entry<K, V>> entryList = new ArrayList<Map.Entry<K, V>>(input.size());
中的input.size()应该改为input.entrySet()

@hankcs hankcs closed this as completed in a538d07 Apr 27, 2019
@hankcs
Copy link
Owner

hankcs commented Apr 27, 2019

感谢反馈,已经修复,请参考上面的commit。
如果还有问题,欢迎重开issue。

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

2 participants