You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/02/12 14:09:22 UTC
[16/22] ignite git commit: Fix R# analysis warnings
Fix R# analysis warnings
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/877be93e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/877be93e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/877be93e
Branch: refs/heads/ignite-2407
Commit: 877be93ee35afddcc126a147cfd3cd1dda4a46ce
Parents: 0491a5f
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Feb 11 16:31:28 2016 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Thu Feb 11 16:31:28 2016 +0300
----------------------------------------------------------------------
.../Impl/Common/IgniteConfigurationXmlSerializer.cs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/877be93e/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
index af25bfa..c27012a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
@@ -23,7 +23,6 @@ namespace Apache.Ignite.Core.Impl.Common
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
- using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Xml;
@@ -99,14 +98,13 @@ namespace Apache.Ignite.Core.Impl.Common
/// <summary>
/// Writes the property of a basic type (primitives, strings, types).
/// </summary>
- [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")]
private static void WriteBasicProperty(object obj, XmlWriter writer, Type valueType, PropertyInfo property)
{
var converter = GetConverter(property, valueType);
var stringValue = converter.ConvertToInvariantString(obj);
- writer.WriteString(stringValue);
+ writer.WriteString(stringValue ?? "");
}
/// <summary>
@@ -125,7 +123,6 @@ namespace Apache.Ignite.Core.Impl.Common
/// <summary>
/// Writes the complex property (nested object).
/// </summary>
- [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")]
private static void WriteComplexProperty(object obj, XmlWriter writer, Type valueType)
{
var props = GetNonDefaultProperties(obj).ToList();
@@ -139,7 +136,7 @@ namespace Apache.Ignite.Core.Impl.Common
{
var converter = GetConverter(prop, prop.PropertyType);
var stringValue = converter.ConvertToInvariantString(prop.GetValue(obj, null));
- writer.WriteAttributeString(PropertyNameToXmlName(prop.Name), stringValue);
+ writer.WriteAttributeString(PropertyNameToXmlName(prop.Name), stringValue ?? "");
}
// Write elements