BUG OF THE MONTH | A logical error

V3022 Expression ‘RowsCount > 100000’ is always false. ProcessingEngine.cs 559
V3022 Expression ‘RowsCount > 200000’ is always false. ProcessingEngine.cs 561

public void ProcessFiles(....)
  int RowsCount = 
  if (RowsCount > 20000)
    DatatableUpdateInterval = 30000; //30s
  else if (RowsCount > 100000)
    DatatableUpdateInterval = 60000; //1min
  else if (RowsCount > 200000)
    DatatableUpdateInterval = 120000; //2min

The if block contains a logical error. In case the condition RowsCount > 20000 is true, other checks will be ignored as false, and the result will always be the value DatatableUpdateInterval = 30000.

Please click here to see more bugs from this project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.