elki-project / elki

ELKI Data Mining Toolkit
https://elki-project.github.io/
GNU Affero General Public License v3.0
780 stars 321 forks source link

Fix two lgtm.com alerts: comparisons using '==' and '!=' operators only test for reference equality #30

Closed sj closed 7 years ago

sj commented 7 years ago

I hope this is the right way to contribute!

Just wanted to quickly fix these alerts flagged up on lgtm.com. Using the '==' and '!=' operators on boxed integers only tests for reference equality, rather than for value equality.

More details:

A total of 160 alerts have been flagged up by lgtm.com: https://lgtm.com/projects/g/elki-project/elki/alerts/

Tip: enable pull request integration for fully automated PR reviews to make sure tiny mistakes like these do not actually get past code review.

codecov-io commented 7 years ago

Codecov Report

Merging #30 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #30   +/-   ##
=========================================
  Coverage     33.84%   33.84%           
  Complexity     8384     8384           
=========================================
  Files          1641     1641           
  Lines         84604    84604           
  Branches      15559    15559           
=========================================
  Hits          28630    28630           
  Misses        53366    53366           
  Partials       2608     2608
Impacted Files Coverage Δ Complexity Δ
...ithm/clustering/correlation/cash/CASHInterval.java 66.66% <0%> (ø) 29 <0> (ø) :arrow_down:
...fi/dbs/elki/index/tree/AbstractDirectoryEntry.java 70% <0%> (ø) 10 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e3a5818...2876131. Read the comment docs.

kno10 commented 7 years ago

Hello, Thank you. I have solved these slightly differently (and some of the other issues detected) in 5408ae54f33cfd86d923f6312738754737c1b95a