.NET: Fix inspection warnings Updated R# inspections caught new issues. Add assertions.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/743b25fa Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/743b25fa Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/743b25fa Branch: refs/heads/ignite-10639 Commit: 743b25fae300e776167c735566c36d2ac86c1e39 Parents: c5197e0 Author: Pavel Tupitsyn <[email protected]> Authored: Sat Dec 15 11:27:48 2018 +0300 Committer: Pavel Tupitsyn <[email protected]> Committed: Sat Dec 15 11:27:48 2018 +0300 ---------------------------------------------------------------------- .../dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs | 1 + .../dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs | 1 + 2 files changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/743b25fa/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs index 4eebbf9..54df5f0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs @@ -47,6 +47,7 @@ namespace Apache.Ignite.Core.Impl.Common public static Func<object, object> CompileFunc(Type targetType) { var method = targetType.GetMethod(DefaultMethodName); + Debug.Assert(method != null, "method != null"); var targetParam = Expression.Parameter(typeof(object)); var targetParamConverted = Expression.Convert(targetParam, targetType); http://git-wip-us.apache.org/repos/asf/ignite/blob/743b25fa/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs index 755d1f1..9a2bdb7 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs @@ -737,6 +737,7 @@ namespace Apache.Ignite.Core.Impl.Datastream new DataStreamerBatch<TK, TV>(curBatch) : null, curBatch) == curBatch; // 2. Perform actual send. + Debug.Assert(curBatch != null, "curBatch != null"); curBatch.Send(this, plc); if (wait)
