diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 153b22fbe8..314a605795 100755 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs @@ -597,8 +597,7 @@ namespace OpenSim.Groups string giver = notice.noticeData.AttachmentOwnerID; UUID attachmentUUID = notice.noticeData.AttachmentItemID; - if (attachmentUUID == null || attachmentUUID.IsZero() || - giver == null || giver == UUID.ZeroString ) + if (attachmentUUID.IsZero() || giver == null || giver == UUID.ZeroString ) return; if (m_debugEnabled) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs index c41a69bd3b..b38e0c9670 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs @@ -72,7 +72,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions { while (tries > 0) { - RegionInfo[] regionInfos = new RegionInfo[] { }; + RegionInfo[] regionInfos = Array.Empty(); int regionCount = 0; HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); webRequest.Timeout = 30000; //30 Second Timeout @@ -118,10 +118,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions if (((HttpWebResponse)ex.Response).StatusCode == HttpStatusCode.NotFound) { if (!allowRegionless) - throw ex; + throw; } else - throw ex; + throw; } if (regionCount > 0 || allowRegionless) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 07a9ba83dc..feb247398f 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -1216,11 +1216,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_log.InfoFormat("[RADMIN]: CreateUser: User {0} {1} created, UUID {2}", firstName, lastName, account.PrincipalID); } - catch (Exception e) + catch { responseData["avatar_uuid"] = UUID.Zero.ToString(); - - throw e; + throw; } m_log.Info("[RADMIN]: CreateUser: request complete"); @@ -1446,11 +1445,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController firstName, lastName, account.PrincipalID); } - catch (Exception e) + catch { responseData["avatar_uuid"] = UUID.Zero.ToString(); - - throw e; + throw; } m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); @@ -1583,7 +1581,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController { responseData["success"] = false; responseData["error"] = e.Message; - throw e; + throw; } m_log.Info("[RADMIN]: AuthenticateUser: request complete"); @@ -1668,11 +1666,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["loaded"] = true; } - catch (Exception e) + catch { responseData["loaded"] = false; - - throw e; + throw; } m_log.Info("[RADMIN]: Load OAR Administrator Request complete"); @@ -1792,11 +1789,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["saved"] = true; } - catch (Exception e) + catch { responseData["saved"] = false; - - throw e; + throw; } m_log.Info("[RADMIN]: Save OAR Request complete"); @@ -1856,12 +1852,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["loaded"] = true; } - catch (Exception e) + catch { responseData["loaded"] = false; responseData["switched"] = false; - - throw e; + throw; } m_log.Info("[RADMIN]: Load XML Administrator Request complete"); @@ -1909,12 +1904,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["saved"] = true; } - catch (Exception e) + catch { responseData["saved"] = false; responseData["switched"] = false; - - throw e; + throw; } m_log.Info("[RADMIN]: Save XML Administrator Request complete"); diff --git a/OpenSim/Framework/Lazy.cs b/OpenSim/Framework/Lazy.cs index ea07d0ecf6..44a7ba79fc 100644 --- a/OpenSim/Framework/Lazy.cs +++ b/OpenSim/Framework/Lazy.cs @@ -45,7 +45,6 @@ namespace OpenSim.Framework [SerializableAttribute] [ComVisibleAttribute(false)] - [HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, ExternalThreading = true)] public class Lazy { T value; diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 0d624668a9..be6c97346d 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -2156,7 +2156,7 @@ namespace OpenSim.Framework.Servers.HttpServer // We want this exception to halt the entire server since in current configurations we aren't too // useful without inbound HTTP. - throw e; + throw; } m_requestsProcessedStat = new Stat( diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 2a2f1f0447..2d48c2acb1 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -993,7 +993,7 @@ namespace OpenSim.Framework catch (Exception e) { m_log.InfoFormat("[FORMS]: Error creating {0} request to : {1}. Request: {2}", verb, requestUrl, e.Message); - throw e; + throw; } int sendlen = 0; @@ -1015,7 +1015,7 @@ namespace OpenSim.Framework catch (Exception e) { m_log.InfoFormat("[FORMS]: Error sending {0} request to: {1}. {2}", verb,requestUrl, e.Message); - throw e; + throw; } } @@ -1036,7 +1036,7 @@ namespace OpenSim.Framework catch (Exception e) { m_log.InfoFormat("[FORMS]: Error receiving response from {0}: {1}.", requestUrl, e.Message); - throw e; + throw; } int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); @@ -1091,7 +1091,7 @@ namespace OpenSim.Framework catch (Exception e) { m_log.InfoFormat("[FORMS]: Error creating POST request to {0}: {1}", requestUrl, e.Message); - throw e; + throw; } byte[] data = Util.UTF8NBGetbytes(obj); @@ -1110,7 +1110,7 @@ namespace OpenSim.Framework catch (Exception e) { m_log.InfoFormat("[FORMS]: Error sending POST request to {0}: {1}", requestUrl, e.Message); - throw e; + throw; } string respstring = String.Empty; @@ -1129,7 +1129,7 @@ namespace OpenSim.Framework catch (Exception e) { m_log.InfoFormat("[FORMS]: Error receiving response from {0}: {1}", requestUrl, e.Message); - throw e; + throw; } int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 7933ef70ad..53e9fac68b 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -1171,10 +1171,10 @@ namespace Nwc.XmlRpc { resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml); } - catch (Exception e) + catch { RequestResponse = inputXml; - throw e; + throw; } } }