Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit 0bfebf7

Browse files
committed
Use string.IsNullOrEmpty() instead of empty string check.
1 parent 60fd1f2 commit 0bfebf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void ValidateContentType(MediaTypeHeaderValue contentType)
6666

6767
private string RemovePeriodIfPresent(string format)
6868
{
69-
if (format == "")
69+
if (string.IsNullOrEmpty(format))
7070
{
7171
throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(format));
7272
}

0 commit comments

Comments
 (0)