Skip to content

Commit 3cab6fb

Browse files
committed
Test IsNonNullableValueType before IsImmutableArray
1 parent 5ed6afa commit 3cab6fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

OpenStackNetAnalyzers/OpenStackNetAnalyzers/NonNullableJsonPropertyAnalyzer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ private void HandleProperty(SymbolAnalysisContext context)
5656

5757
private void AnalyzeSymbol(SymbolAnalysisContext context, ISymbol symbol, ITypeSymbol type)
5858
{
59+
if (!type.IsNonNullableValueType())
60+
return;
61+
5962
if (type.IsImmutableArray())
6063
{
6164
// special-case this value type
6265
return;
6366
}
6467

65-
if (!type.IsNonNullableValueType())
66-
return;
67-
6868
AttributeData jsonPropertyAttribute = GetJsonPropertyAttributeData(symbol.GetAttributes());
6969
if (jsonPropertyAttribute == null)
7070
return;

0 commit comments

Comments
 (0)