microsoft / CSharpClient-for-Kafka

.Net implementation of the Apache Kafka Protocol that provides basic functionality through Producer/Consumer classes. The project also offers balanced consumer implementation.
Other
463 stars 95 forks source link

[PVS-Studio] V3005 - ConsumeGroupFindNewLeaderSleepIntervalMs variable assigned to itself #20

Closed jthelin closed 8 years ago

jthelin commented 8 years ago

The kind people at Viva64 gave an evaluation license for PVS-Studio to try out on some OSS projects, and running it on Kafkanet source code found this problem. http://www.viva64.com/en/pvs-studio/

https://github.com/Microsoft/Kafkanet/blob/master/src/KafkaNET.Library/Cfg/ConsumerConfiguration.cs#L127

Error V3005. The 'ConsumeGroupFindNewLeaderSleepIntervalMs' variable is assigned to itself http://www.viva64.com/en/d/0403/print/

I imagine that line should probably be same as Line 93 ?

this.ConsumeGroupFindNewLeaderSleepIntervalMs = DefaultConsumeGroupFindNewLeaderSleepIntervalMs;
riamandii commented 8 years ago

thx for letting me know!

On Friday, March 4, 2016 1:47 PM, Jorgen Thelin <notifications@github.com> wrote:

The kind people at Viva64 gave an evaluation license for PVS-Studio to try out on some OSS projects, and running it on Kafkanet source code found this problem. http://www.viva64.com/en/pvs-studio/https://github.com/Microsoft/Kafkanet/blob/master/src/KafkaNET.Library/Cfg/ConsumerConfiguration.cs#L127Error V3005. The 'ConsumeGroupFindNewLeaderSleepIntervalMs' variable is assigned to itself http://www.viva64.com/en/d/0403/print/I imagine that line should probably be same as Line 93 ?this.ConsumeGroupFindNewLeaderSleepIntervalMs = DefaultConsumeGroupFindNewLeaderSleepIntervalMs;— Reply to this email directly or view it on GitHub.

jthelin commented 8 years ago

I created PR #21 to fix this issue.

jthelin commented 8 years ago

PR #21 has been merged to fix this issue.