Skip to content

Commit c401cd9

Browse files
committed
Fix most of CodeFactor issues
1 parent 518f2e0 commit c401cd9

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/NHibernate.Test/Linq/SelectionTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ public void CanSelectWithIsOperator()
706706
Assert.DoesNotThrow(() => db.Animals.Select(a => a.FatherSerialNumber is string).ToList());
707707
}
708708

709-
710709
[Test]
711710
public void CanSelectComponentProperty()
712711
{

src/NHibernate/Linq/Visitors/SelectClauseNominator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ private bool CanBeEvaluatedInHql(Expression expression)
150150
private bool CanBeEvaluatedInHql(MethodCallExpression methodExpression)
151151
{
152152
var canBeEvaluated = methodExpression.Object == null || // Is static or extension method
153-
methodExpression.Object.NodeType != ExpressionType.Constant && // Does not belong to a parameter
154-
CanBeEvaluatedInHql(methodExpression.Object);
153+
(methodExpression.Object.NodeType != ExpressionType.Constant && // Does not belong to a parameter
154+
CanBeEvaluatedInHql(methodExpression.Object));
155155
foreach (var argumentExpression in methodExpression.Arguments)
156156
{
157157
// If one of the agruments cannot be converted to hql we have to execute the method on the client side

src/NHibernate/Linq/Visitors/SelectClauseVisitor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void VisitSelector(Expression expression)
6363

6464
// Now visit the tree
6565
var projection = Transform(Visit(expression));
66-
if (projection != expression && !_hqlNodes.Contains(expression) || _hqlTreeNodes.Count == 0)
66+
if ((projection != expression && !_hqlNodes.Contains(expression)) || _hqlTreeNodes.Count == 0)
6767
{
6868
ProjectionExpression = Expression.Lambda(projection, _inputParameter);
6969
}
@@ -85,7 +85,6 @@ public void VisitSelector(Expression expression)
8585
}
8686
}
8787

88-
8988
#region Overrides
9089

9190
public override Expression Visit(Expression expression)

0 commit comments

Comments
 (0)