mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Replace == null with is null
This commit is contained in:
@@ -144,7 +144,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
{
|
||||
IConfigurationFactory factory = Activator.CreateInstance<T>();
|
||||
|
||||
if (_configurationFactories == null)
|
||||
if (_configurationFactories is null)
|
||||
{
|
||||
_configurationFactories = new[] { factory };
|
||||
}
|
||||
@@ -306,7 +306,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
configurationManager._configurationStores,
|
||||
i => string.Equals(i.Key, k, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (configurationInfo == null)
|
||||
if (configurationInfo is null)
|
||||
{
|
||||
throw new ResourceNotFoundException("Configuration with key " + k + " not found.");
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
Span<byte> newBytes = stream.GetBuffer().AsSpan(0, (int)stream.Length);
|
||||
|
||||
// If the file didn't exist before, or if something has changed, re-save
|
||||
if (buffer == null || !newBytes.SequenceEqual(buffer))
|
||||
if (buffer is null || !newBytes.SequenceEqual(buffer))
|
||||
{
|
||||
var directory = Path.GetDirectoryName(path) ?? throw new ArgumentException($"Provided path ({path}) is not valid.", nameof(path));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user