Skip to content

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

Open
sj wants to merge 2 commits intomimno:masterfrom
sj:fix-lgtm-alerts
Open

Fix lgtm.com alerts: NaN comparison and correct type casting#96
sj wants to merge 2 commits intomimno:masterfrom
sj:fix-lgtm-alerts

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