CA1800:DoNotCastUnnecessarily: false positive?!

The code below is giving me thiswarning:
CA1800 : Microsoft.Performance : 'sender', a parameter, is cast to type 'System.Web.UI.WebControls.ObjectDataSource' multiple times in method EditPage.ObjectDataSourceInserted(Object, ObjectDataSourceStatusEventArgs):Void. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. ...

code:
protected virtual void ObjectDataSourceInserted(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception == null)
{
ObjectDataSourceInsertedOk((ObjectDataSource) sender, e);
}
else
{
ObjectDataSourceInsertedError((ObjectDataSource) sender, e);
}
}
I consider this a false positive.

[839 byte] By [erwind] at [2007-12-20]
# 1

This is a known false positive in the current analysis that we perform for this rule.

We are currently rewriting our data flow analysis engine, which means rules such as this one, will be rewritten to be path 'aware'.

Thanks for the feedback

David

DavidM.Kean-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...

Visual Studio Team System

Site Classified