Skip to content

Commit ef638c8

Browse files
Annotate nullable WQL helper returns
Agent-Logs-Url: https://github.com/webexpress-framework/WebExpress.WebIndex/sessions/ee1582bc-9681-41fd-b0d1-7d94f2132de5 Co-authored-by: ReneSchwarzer <31061438+ReneSchwarzer@users.noreply.github.com>
1 parent 74600ab commit ef638c8

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/WebExpress.WebIndex/Wql/Function/WqlExpressionNodeFilterFunctionLower.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ public override Expression ToExpression(ParameterExpression param)
4747
return Expression.Call(EvaluateMethod, Expression.Convert(valueExpression, typeof(object)));
4848
}
4949

50-
[return: System.Diagnostics.CodeAnalysis.MaybeNull]
51-
private static string Evaluate(object value)
50+
#nullable enable
51+
private static string? Evaluate(object value)
5252
{
5353
return value?.ToString()?.ToLowerInvariant();
5454
}
55+
#nullable restore
5556
}
5657
}

src/WebExpress.WebIndex/Wql/Function/WqlExpressionNodeFilterFunctionTrim.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ public override Expression ToExpression(ParameterExpression param)
4747
return Expression.Call(EvaluateMethod, Expression.Convert(valueExpression, typeof(object)));
4848
}
4949

50-
[return: System.Diagnostics.CodeAnalysis.MaybeNull]
51-
private static string Evaluate(object value)
50+
#nullable enable
51+
private static string? Evaluate(object value)
5252
{
5353
return value?.ToString()?.Trim();
5454
}
55+
#nullable restore
5556
}
5657
}

src/WebExpress.WebIndex/Wql/Function/WqlExpressionNodeFilterFunctionUpper.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ public override Expression ToExpression(ParameterExpression param)
4848
return Expression.Call(EvaluateMethod, Expression.Convert(valueExpression, typeof(object)));
4949
}
5050

51-
[return: System.Diagnostics.CodeAnalysis.MaybeNull]
52-
private static string Evaluate(object value)
51+
#nullable enable
52+
private static string? Evaluate(object value)
5353
{
5454
return value?.ToString()?.ToUpperInvariant();
5555
}
56+
#nullable restore
5657
}
5758
}

0 commit comments

Comments
 (0)