From 6595e3ae26bea23324cdced884b8e1bfc66c10ab Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jan 2022 13:59:41 +0000 Subject: [PATCH] cosmetics --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs | 2 +- .../Addons/Groups/Remote/GroupsServiceRemoteConnector.cs | 2 +- .../Groups/Remote/GroupsServiceRemoteConnectorModule.cs | 2 +- OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs | 2 +- OpenSim/Framework/InventoryItemBase.cs | 2 +- .../Servers/HttpServer/OSHttpServer/HttpRequestParser.cs | 2 +- OpenSim/Framework/TaskInventoryItem.cs | 2 +- .../Connectors/Presence/PresenceServicesConnector.cs | 4 ++-- .../Connectors/UserAccounts/UserAccountServicesConnector.cs | 6 +++--- OpenSim/Services/LLLoginService/LLLoginService.cs | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs index 6239623c66..5bca654092 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs @@ -95,7 +95,7 @@ namespace OpenSim.Groups public ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName, string token) { - if (GroupID.IsZero() && (GroupName == null || (GroupName != null && GroupName == string.Empty))) + if (GroupID.IsZero() && string.IsNullOrEmpty(GroupName)) return null; Dictionary sendData = new Dictionary(); diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs index 46db729003..296e63d77b 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs @@ -134,7 +134,7 @@ namespace OpenSim.Groups public ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName) { - if (GroupID.IsZero() && (GroupName == null || (GroupName != null && GroupName == string.Empty))) + if (GroupID.IsZero() && string.IsNullOrEmpty(GroupName)) return null; Dictionary sendData = new Dictionary(); diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs index 40a6e34c02..1fc3afd1ef 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs @@ -183,7 +183,7 @@ namespace OpenSim.Groups public ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName) { - if (GroupID.IsZero() && (GroupName == null || GroupName != null && GroupName == string.Empty)) + if (GroupID.IsZero() && string.IsNullOrEmpty(GroupName)) return null; return m_CacheWrapper.GetGroupRecord(RequestingAgentID,GroupID,GroupName, delegate diff --git a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs index 1f1ea5c7a5..1bb4b89d15 100644 --- a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs +++ b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs @@ -109,7 +109,7 @@ namespace OpenSim.Groups public ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName, GroupRecordDelegate d) { - //if (GroupID.IsZero() && (GroupName == null || GroupName != null && GroupName == string.Empty)) + //if (GroupID.IsZero() && string.IsNullOrEmpty(GroupName)) // return null; object group = null; diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index c4ec174c48..ccb269a626 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs @@ -134,7 +134,7 @@ namespace OpenSim.Framework } set { - if ((value == null) || (value != null && value == string.Empty)) + if (string.IsNullOrEmpty(value)) { m_creatorData = string.Empty; return; diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpRequestParser.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpRequestParser.cs index 470596e59d..14d1240e27 100644 --- a/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpRequestParser.cs +++ b/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpRequestParser.cs @@ -358,7 +358,7 @@ namespace OSHttpServer.Parser { if (ch == '\r' || ch == '\n') { - if (m_curHeaderName == string.Empty) + if (m_curHeaderName.Length == 0) throw new BadRequestException("Missing header on line " + currentLine); if (currentPos - startPos > 8190) diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 1cc32b3407..039326ee6d 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs @@ -132,7 +132,7 @@ namespace OpenSim.Framework } set { - if ((value == null) || (value != null && value == string.Empty)) + if (string.IsNullOrEmpty(value)) { _creatorData = string.Empty; return; diff --git a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs index 3676a3cca9..c29a90ae86 100644 --- a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs +++ b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs @@ -267,7 +267,7 @@ namespace OpenSim.Services.Connectors uri, reqString, m_Auth); - if (reply == null || (reply != null && reply == string.Empty)) + if (string.IsNullOrEmpty(reply)) { m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgent received null or empty reply"); return null; @@ -324,7 +324,7 @@ namespace OpenSim.Services.Connectors uri, reqString, m_Auth); - if (reply == null || (reply != null && reply == string.Empty)) + if (string.IsNullOrEmpty(reply)) { m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents received null or empty reply"); return null; diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index 7e8dc1a9fc..6489603b43 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs @@ -156,7 +156,7 @@ namespace OpenSim.Services.Connectors uri, reqString, m_Auth); - if (reply == null || (reply != null && reply == string.Empty)) + if (string.IsNullOrEmpty(reply)) { m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccounts received null or empty reply"); return null; @@ -240,7 +240,7 @@ namespace OpenSim.Services.Connectors uri, reqString, m_Auth); - if (reply == null || (reply != null && reply == string.Empty)) + if (string.IsNullOrEmpty(reply)) { m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetMultiUserAccounts received null or empty reply"); return null; @@ -364,7 +364,7 @@ namespace OpenSim.Services.Connectors uri, reqString, m_Auth); - if (reply == null || (reply != null && reply == string.Empty)) + if (string.IsNullOrEmpty(reply)) { m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccount received null or empty reply"); return null; diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index e7b39adae4..553b2bda5a 100755 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -266,7 +266,7 @@ namespace OpenSim.Services.LLLoginService // string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); UUID secureSession = UUID.Zero; - if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) + if ((token == string.Empty) || (!UUID.TryParse(token, out secureSession))) { m_log.InfoFormat("[LLOGIN SERVICE]: SetLevel failed, reason: authentication failed"); return response;