From 00b6e71e3151fbce724403112f999fd45cc75242 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 21 Sep 2015 17:22:27 -0700 Subject: [PATCH] Changes per NotNull PR comments --- .../DataTypeAttributeAdapter.cs | 6 +----- .../DefaultClientModelValidatorProvider.cs | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs index 5386156b7d..f815135b29 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs @@ -19,15 +19,11 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation string ruleName) : base(attribute) { - if (ruleName == null) - { - throw new ArgumentNullException(nameof(ruleName)); - } - if (string.IsNullOrEmpty(ruleName)) { throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(ruleName)); } + RuleName = ruleName; } diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs index b05e8d7047..8cb1c3f87f 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs @@ -2,8 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.AspNet.Mvc.ModelBinding.Validation {