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

Fix lgtm.com alerts: NaN comparison and correct type casting #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sj
Copy link

@sj sj commented Apr 21, 2017

GainRatio.java: comparing a value to Double.NaN using '!=' operator will always return
true: 'NaN != NaN'. Using Double.isNaN(...) instead.

More details: https://lgtm.com/projects/g/mimno/Mallet/snapshot/dist-15540021-1490802114895/files/src/cc/mallet/types/GainRatio.java#L245

PropertyList.java: don't cast to Double when it's not a Double. More info: https://lgtm.com/projects/g/mimno/Mallet/snapshot/dist-15540021-1490802114895/files/src/cc/mallet/util/PropertyList.java#L83

There are a total of 185 alerts reported for MALLET on lgtm.com: https://lgtm.com/projects/g/mimno/Mallet/alerts

Tip: enable pull request integration for automatic code review!

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

Successfully merging this pull request may close these issues.

1 participant