edemo / PDEngine

voting engine using ADA authentication and condorcet method
Other
2 stars 12 forks source link

fix string comparison #186

Closed magwas closed 5 years ago

magwas commented 5 years ago

no testcase needed. Counts as 1 testcase. https://sonarcloud.io/project/issues?branch=develop&id=org.rulez.demokracia%3APDEngine&open=AWjRti-NEzgCzR11fxzX

valentinbujdoso commented 5 years ago

If I say there is already fixed, can I get the 1 testcase? :)

colorimeter commented 5 years ago

Fixed since ages, but not optimally: the check of "type" should be outside of the for loop since it does not change. :)

magwas commented 5 years ago

No, it is not fixed, the code contains '==' instead of .equals(). That is the problem.

valentinbujdoso commented 5 years ago

I think what you see on sonarcloud is from February 9, 2019, 11:55 AM

magwas commented 5 years ago

oh, my. You are right. Git blame even says that I have fixed it :) Alzheimer makes you meet new people every day.