SCM

[#1011189] NullReferenceException in SqlGenerators\VisitedExpression.cs

View Trackers | Bugs | Download .csv | Monitor

Date:
2012-04-26 08:49
Priority:
3
State:
Open
Submitted by:
Oliver Stöneberg (firewave)
Assigned to:
Nobody (None)
Npgsql Version:
2.0.11
Category:
Group:
Resolution:
None
Summary:
NullReferenceException in SqlGenerators\VisitedExpression.cs

Detailed description
p:\Downloads\Npgsql2.0.11.93.src\src\Npgsql\SqlGenerators\VisitedExpression.cs(439,32): warning CS0649: Field 'Npgsql.SqlGenerators.ScanExpression._projectedColumns' is never assigned to, and will always have its default value null

List<ColumnExpression> _projectedColumns;
internal override IEnumerable<ColumnExpression> GetProjectedColumns()
{
if (_projectedColumns == null)
{
foreach (var property in _target.ElementType.Members.OfType<EdmProperty>())
{
_projectedColumns.Add(new ColumnExpression(new PropertyExpression(property), property.Name, property.TypeUsage));
}
}
return _projectedColumns;
}

The list needs to be created before adding entries.

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge