Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-288123: Invertif Changes the logic of the statement

$
0
0
Reporter Sean Epping (jsseanepping) Sean Epping (jsseanepping)
Created Feb 2, 2012 2:45:28 AM
Updated Feb 20, 2012 5:56:43 PM
Resolved Feb 20, 2012 5:56:43 PM
Priority Normal
Type Bug
Fix versions No Fix versions
State Won't fix
Assignee Alexey Kuptsov (alexey.kuptsov)
Subsystem Refactoring
Affected versions 6.1
Fixed in build No Fixed in build
When applied to:

public void OpenMarket()
{
if (MarketState != MarketState.Open || MarketState != MarketState.Opening)
{
lock (_marketStateLock)
{
if (MarketState != MarketState.Open || MarketState != MarketState.Opening)
{
MarketState = MarketState.Opening;
_timer = new Timer(UpdateStockPrices, null, _updateInterval, _updateInterval);
MarketState = MarketState.Open;
BroadcastMarketStateChange(MarketState.Open);
}
}
}
}

It produces:

if(MarketState == MarketState.Open
&& MarketState == MarketState.Opening)
{
return;
}
lock (_marketStateLock)
{
if (MarketState != MarketState.Open || MarketState != MarketState.Opening)
{
MarketState = MarketState.Opening;
_timer = new Timer(UpdateStockPrices, null, _updateInterval, _updateInterval);
MarketState = MarketState.Open;
BroadcastMarketStateChange(MarketState.Open);
}
}

Which could never be true in this case.

Viewing all articles
Browse latest Browse all 106942

Trending Articles