diff options
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs index 3c62ffe..1305620 100644 --- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs +++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs @@ -1107,12 +1107,18 @@ namespace DotNetOpenAuth.Messaging { /// Tests whether two arrays are equal in contents and ordering. /// </summary> /// <typeparam name="T">The type of elements in the arrays.</typeparam> - /// <param name="first">The first array in the comparison. May not be null.</param> - /// <param name="second">The second array in the comparison. May not be null.</param> + /// <param name="first">The first array in the comparison. May be null.</param> + /// <param name="second">The second array in the comparison. May be null.</param> /// <returns>True if the arrays equal; false otherwise.</returns> internal static bool AreEquivalent<T>(T[] first, T[] second) { - Requires.NotNull(first, "first"); - Requires.NotNull(second, "second"); + if (first == null && second == null) { + return true; + } + + if (first == null || second == null) { + return false; + } + if (first.Length != second.Length) { return false; } |