Skip to content

Commit

Permalink
Fix uncaught code analysis warnings causing a build break
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsensesoftware committed Dec 28, 2022
1 parent 52cb28d commit e9242d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ODataApiExplorer( HttpConfiguration configuration )
public ODataApiExplorer( HttpConfiguration configuration, ODataApiExplorerOptions options )
: base( configuration, options )
{
this.options = options;
this.options = options ?? throw new ArgumentNullException( nameof( options ) );
options.AdHocModelBuilder.OnModelCreated += MarkAsAdHoc;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public partial class ImplicitModelBoundSettingsConvention : IModelConfiguration,
/// <inheritdoc />
public void ApplyTo( ApiDescription apiDescription )
{
if ( apiDescription == null )
{
throw new ArgumentNullException( nameof( apiDescription ) );
}

var response = apiDescription.ResponseDescription;
var type = response.ResponseType ?? response.DeclaredType;

Expand Down

0 comments on commit e9242d6

Please sign in to comment.