== string.Empty is .Lenght == 0

This commit is contained in:
UbitUmarov
2022-01-13 20:31:52 +00:00
parent 6595e3ae26
commit fbbcc1edd7
149 changed files with 261 additions and 264 deletions

View File

@@ -153,7 +153,7 @@ namespace OpenSim.Framework.Serialization.External
[Obsolete("This method is deprecated. Use RewriteSOP instead.")]
public static string RewriteSOP_Old(string xml, string homeURL, IUserAccountService userService, UUID scopeID)
{
if (xml == string.Empty || homeURL == string.Empty || userService == null)
if (xml.Length == 0 || homeURL.Length == 0 || userService == null)
return xml;
XmlDocument doc = new XmlDocument();
@@ -213,7 +213,7 @@ namespace OpenSim.Framework.Serialization.External
public static string RewriteSOP(string xmlData, string sceneName, string homeURL, IUserAccountService userService, UUID scopeID)
{
// Console.WriteLine("Input XML [{0}]", xmlData);
if (xmlData == string.Empty || homeURL == string.Empty || userService == null)
if (xmlData.Length == 0 || homeURL.Length == 0 || userService == null)
return xmlData;
// Deal with bug introduced in Oct. 20 2014 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8)