From 8cb3326517a5fa07debf406fcc39467c0b9eed99 Mon Sep 17 00:00:00 2001 From: nurhafiz Date: Thu, 2 May 2024 08:59:14 +0800 Subject: [PATCH] Shorten statement --- src/Toimik.UrlNormalization/UrlNormalizer.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Toimik.UrlNormalization/UrlNormalizer.cs b/src/Toimik.UrlNormalization/UrlNormalizer.cs index c6f3bda..a7dc1be 100644 --- a/src/Toimik.UrlNormalization/UrlNormalizer.cs +++ b/src/Toimik.UrlNormalization/UrlNormalizer.cs @@ -96,10 +96,7 @@ public virtual string Normalize(string url, string? baseUrl = null) } tryCount++; - if (baseUrl == null) - { - throw new ArgumentNullException(nameof(baseUrl)); - } + ArgumentNullException.ThrowIfNull(baseUrl); // Prefix the url with the base URL as it is determined that the former is relative. A // slash is added between them in case the url is not prefixed with one. Multiple