diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionException.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionException.cs index 1a1409832d0103..869662cb489d82 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionException.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionException.cs @@ -197,8 +197,7 @@ private static void WriteHeader(StringBuilder writer, int errorsCount, int pathC // The composition produced a single composition error. The root cause is provided below. writer.AppendFormat( CultureInfo.CurrentCulture, - SR.CompositionException_SingleErrorWithSinglePath, - pathCount); + SR.CompositionException_SingleErrorWithSinglePath); } writer.Append(' '); diff --git a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/OnImportsSatisfiedFeature.cs b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/OnImportsSatisfiedFeature.cs index 9b0e7f096b8d2b..87a4e4c5ae41d4 100644 --- a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/OnImportsSatisfiedFeature.cs +++ b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/OnImportsSatisfiedFeature.cs @@ -40,7 +40,7 @@ public override CompositeActivator RewriteActivator( foreach (var m in importsSatisfiedMethods) { - if (!(m.IsPublic || m.IsAssembly) | m.IsStatic || m.ReturnType != typeof(void) || + if (!(m.IsPublic || m.IsAssembly) || m.IsStatic || m.ReturnType != typeof(void) || m.IsGenericMethodDefinition || m.GetParameters().Length != 0) { string message = SR.Format(SR.OnImportsSatisfiedFeature_AttributeError, partType, m.Name); diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs index 6fcd05b49a38b4..4a5d463414f04b 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs @@ -360,10 +360,10 @@ internal unsafe IntPtr GetReplicationInfoHelper(IntPtr dsHandle, int type, int s } catch (COMException e) { - if (e.ErrorCode == unchecked((int)0x80072020) | // dir_error on server side + if (e.ErrorCode == unchecked((int)0x80072020) || // dir_error on server side e.ErrorCode == unchecked((int)0x80072030)) // object not exists throw new ArgumentException(SR.DSNoObject, "objectPath"); - else if (e.ErrorCode == unchecked((int)0x80005000) | // bad path name + else if (e.ErrorCode == unchecked((int)0x80005000) || // bad path name e.ErrorCode == unchecked((int)0x80072032)) // ERROR_DS_INVALID_DN_SYNTAX throw new ArgumentException(SR.DSInvalidPath, "objectPath"); } diff --git a/src/libraries/System.Threading.Channels/src/System/Threading/Channels/BoundedChannel.cs b/src/libraries/System.Threading.Channels/src/System/Threading/Channels/BoundedChannel.cs index ae45c1cfc071af..169c433e9cca7f 100644 --- a/src/libraries/System.Threading.Channels/src/System/Threading/Channels/BoundedChannel.cs +++ b/src/libraries/System.Threading.Channels/src/System/Threading/Channels/BoundedChannel.cs @@ -178,7 +178,7 @@ public override ValueTask ReadAsync(CancellationToken cancellationToken) // cancellation callback could end up running arbitrary code, including code that called back into the reader or // writer and tried to take the same lock held by the thread running UnregisterCancellation... deadlock. As such, // we only allow synchronous continuations here if both a) the caller requested it and the token isn't cancelable. - var reader = new AsyncOperation(parent._runContinuationsAsynchronously | cancellationToken.CanBeCanceled, cancellationToken); + var reader = new AsyncOperation(parent._runContinuationsAsynchronously || cancellationToken.CanBeCanceled, cancellationToken); parent._blockedReaders.EnqueueTail(reader); return reader.ValueTaskOfT; } @@ -232,7 +232,7 @@ public override ValueTask WaitToReadAsync(CancellationToken cancellationTo // cancellation callback could end up running arbitrary code, including code that called back into the reader or // writer and tried to take the same lock held by the thread running UnregisterCancellation... deadlock. As such, // we only allow synchronous continuations here if both a) the caller requested it and the token isn't cancelable. - var waiter = new AsyncOperation(parent._runContinuationsAsynchronously | cancellationToken.CanBeCanceled, cancellationToken); + var waiter = new AsyncOperation(parent._runContinuationsAsynchronously || cancellationToken.CanBeCanceled, cancellationToken); ChannelUtilities.QueueWaiter(ref _parent._waitingReadersTail, waiter); return waiter.ValueTaskOfT; }