Skip to content

Commit

Permalink
Revert workaround for Resharper bug on nullability
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoelman committed Nov 24, 2023
1 parent ebbdcae commit e57971b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,10 @@ public virtual void Read(string parameterName, StringValues parameterValue)
{
try
{
// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
_includeExpression = GetInclude(parameterValue.ToString());
}
catch (QueryParseException exception)
{
// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
string specificMessage = exception.GetMessageWithPosition(parameterValue.ToString());
throw new InvalidQueryStringParameterException(parameterName, "The specified include is invalid.", specificMessage, exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public virtual void Read(string parameterName, StringValues parameterValue)

try
{
// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
PaginationQueryStringValueExpression constraint = GetPageConstraint(parameterValue.ToString());

if (constraint.Elements.Any(element => element.Scope == null))
Expand All @@ -82,8 +80,6 @@ public virtual void Read(string parameterName, StringValues parameterValue)
}
catch (QueryParseException exception)
{
// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
string specificMessage = exception.GetMessageWithPosition(isParameterNameValid ? parameterValue.ToString() : parameterName);
throw new InvalidQueryStringParameterException(parameterName, "The specified pagination is invalid.", specificMessage, exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,12 @@ public virtual void Read(string parameterName, StringValues parameterValue)
ResourceFieldChainExpression? scope = GetScope(parameterName);
parameterNameIsValid = true;

// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
SortExpression sort = GetSort(parameterValue.ToString(), scope);
var expressionInScope = new ExpressionInScope(scope, sort);
_constraints.Add(expressionInScope);
}
catch (QueryParseException exception)
{
// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
string specificMessage = exception.GetMessageWithPosition(parameterNameIsValid ? parameterValue.ToString() : parameterName);
throw new InvalidQueryStringParameterException(parameterName, "The specified sort is invalid.", specificMessage, exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,11 @@ public virtual void Read(string parameterName, StringValues parameterValue)
ResourceType resourceType = GetScope(parameterName);
parameterNameIsValid = true;

// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
SparseFieldSetExpression sparseFieldSet = GetSparseFieldSet(parameterValue.ToString(), resourceType);
_sparseFieldTableBuilder[resourceType] = sparseFieldSet;
}
catch (QueryParseException exception)
{
// Workaround for https://youtrack.jetbrains.com/issue/RSRP-493256/Incorrect-possible-null-assignment
// ReSharper disable once AssignNullToNotNullAttribute
string specificMessage = exception.GetMessageWithPosition(parameterNameIsValid ? parameterValue.ToString() : parameterName);
throw new InvalidQueryStringParameterException(parameterName, "The specified fieldset is invalid.", specificMessage, exception);
}
Expand Down

0 comments on commit e57971b

Please sign in to comment.