Content-Length: 290136 | pFad | http://github.com/json-api-dotnet/JsonApiDotNetCore/commit/b51d68125a14c153048b3e9c32efcf6a5ef4adef

10 Add missing null checks · json-api-dotnet/JsonApiDotNetCore@b51d681 · GitHub
Skip to content

Commit b51d681

Browse files
committed
Add missing null checks
1 parent 11894ad commit b51d681

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/JsonApiDotNetCore/Queries/FieldSelectors.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ public void IncludeAttributes(IEnumerable<AttrAttribute> attributes)
5252
}
5353
}
5454

55-
public void IncludeRelationship(RelationshipAttribute relationship, QueryLayer? queryLayer)
55+
public void IncludeRelationship(RelationshipAttribute relationship, QueryLayer queryLayer)
5656
{
5757
ArgumentGuard.NotNull(relationship);
58+
ArgumentGuard.NotNull(queryLayer);
5859

5960
this[relationship] = queryLayer;
6061
}

src/JsonApiDotNetCore/Repositories/EntityFrameworkCoreRepository.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ public virtual Task<TResource> GetForCreateAsync(Type resourceClrType, TId id, C
163163
id
164164
});
165165

166+
ArgumentGuard.NotNull(resourceClrType);
167+
166168
var resource = (TResource)_resourceFactory.CreateInstance(resourceClrType);
167169
resource.Id = id;
168170

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/json-api-dotnet/JsonApiDotNetCore/commit/b51d68125a14c153048b3e9c32efcf6a5ef4adef

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy