ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [1/3] ignite git commit: Fix R# analysis warnings
Date Thu, 11 Feb 2016 15:25:12 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2468 e11f0fb5e -> d8062a17e


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-2468
Commit: 877be93ee35afddcc126a147cfd3cd1dda4a46ce
Parents: 0491a5f
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Thu Feb 11 16:31:28 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@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


Mime
View raw message