diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 5a3d350b4c..ea12a48dda 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Data; using System.IO; using System.Reflection; +using System.Threading; using libsecondlife; using log4net; using Mono.Data.SqliteClient; @@ -990,13 +991,13 @@ namespace OpenSim.Data.SQLite m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now."); - System.Threading.Thread.Sleep(10000); + Thread.Sleep(10000); // ICK! but it's better then A thousand red SQLITE error messages! Environment.Exit(0); } - catch (System.Exception) + catch (Exception) { // ICK! but it's better then A thousand red SQLITE error messages! m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator"); diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index 4dcf755240..f6accf6a31 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs @@ -26,9 +26,9 @@ */ using System.Collections.Generic; +using libsecondlife; //using System.Reflection; -using libsecondlife; //using log4net; namespace OpenSim.Framework.Communications.Cache diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 049b4a1785..392d796c29 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -29,7 +29,6 @@ using System; using System.Collections.Generic; using System.Reflection; using System.Threading; - using libsecondlife; using log4net; diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index adaec4ec36..0b22d0e8c9 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -26,12 +26,11 @@ */ using System; -using System.Collections; using System.Collections.Generic; -using System.Text.RegularExpressions; using System.Diagnostics; using System.Net; using System.Reflection; +using System.Text.RegularExpressions; using log4net; namespace OpenSim.Framework.Console diff --git a/OpenSim/Framework/UserAppearance.cs b/OpenSim/Framework/UserAppearance.cs index f9e27fa697..b58ed2d8b8 100644 --- a/OpenSim/Framework/UserAppearance.cs +++ b/OpenSim/Framework/UserAppearance.cs @@ -25,7 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using libsecondlife; namespace OpenSim.Framework diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index f8467b6995..db9a864eb2 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs @@ -28,8 +28,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Threading; - using libsecondlife; using log4net; using OpenSim.Framework; diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index d824d21b88..50e06afc3f 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs @@ -36,6 +36,7 @@ using log4net; using Nwc.XmlRpc; using OpenSim.Data; using OpenSim.Framework; + //using System.Xml; namespace OpenSim.Grid.MessagingServer diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index cad0380ba8..e89db3dc9f 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -26,21 +26,17 @@ */ using System; -using System.Collections; using System.Collections.Generic; using System.IO; -using System.Net; using System.Reflection; using System.Text; using System.Threading; -using System.Timers; using libsecondlife; using log4net; using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Statistics; using OpenSim.Region.ClientStack; @@ -50,7 +46,6 @@ using OpenSim.Region.Environment; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Physics.Manager; -using Timer=System.Timers.Timer; namespace OpenSim { diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index 53e3583b0c..ac5a1ec25a 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs @@ -26,33 +26,23 @@ */ using System; +using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using System.IO; -using System.Text; +using System.Net; +using System.Reflection; using System.Threading; using System.Timers; +using libsecondlife; +using log4net; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; -using OpenSim.Framework.Servers; using OpenSim.Framework.Statistics; using OpenSim.Region.ClientStack; -using OpenSim.Region.Communications.Local; -using OpenSim.Region.Communications.OGS1; -using OpenSim.Region.Environment; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Physics.Manager; using Timer=System.Timers.Timer; -using System.Net; -using Nwc.XmlRpc; -using System.Collections; -using System.Reflection; -using libsecondlife; -using Mono.Addins; -using Mono.Addins.Description; namespace OpenSim { @@ -60,7 +50,7 @@ namespace OpenSim public class OpenSimMainConsole : OpenSimMain, conscmd_callback { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected string m_startupCommandsFile; protected string m_shutdownCommandsFile; @@ -243,7 +233,7 @@ namespace OpenSim } else { - m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); + m_sceneManager.CurrentScene.SetSceneCoreDebug(!Convert.ToBoolean(cmdparams[0]), !Convert.ToBoolean(cmdparams[1]), !Convert.ToBoolean(cmdparams[2])); } } else @@ -300,7 +290,7 @@ namespace OpenSim // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); // } - List threads = OpenSim.Framework.ThreadTracker.GetThreads(); + List threads = ThreadTracker.GetThreads(); if (threads == null) { m_console.Notice("THREAD", "Thread tracking is only enabled in DEBUG mode."); @@ -546,7 +536,7 @@ namespace OpenSim case "unload": if (cmdparams.Length > 1) { - foreach (IRegionModule rm in new System.Collections.ArrayList(m_moduleLoader.GetLoadedSharedModules)) + foreach (IRegionModule rm in new ArrayList(m_moduleLoader.GetLoadedSharedModules)) { if (rm.Name.ToLower() == cmdparams[1].ToLower()) { @@ -559,7 +549,7 @@ namespace OpenSim case "load": if (cmdparams.Length > 1) { - foreach (Scene s in new System.Collections.ArrayList(m_sceneManager.Scenes)) + foreach (Scene s in new ArrayList(m_sceneManager.Scenes)) { m_console.Notice("Loading module: " + cmdparams[1]); @@ -632,7 +622,7 @@ namespace OpenSim { RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); string regionName; - System.Net.EndPoint ep = null; + EndPoint ep = null; if (regionInfo == null) { diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index d3f6f204ba..3643088011 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -33,11 +33,11 @@ using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; -//using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Region.Environment; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Physics.Manager; +//using OpenSim.Framework.Console; namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index b1816d047a..8a35519bb2 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -237,7 +237,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/NewItem/", item); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Update new inventory item operation failed, {0} {1}", e.Source, e.Message); diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index b34e126497..e0ea94f0ee 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs @@ -32,7 +32,6 @@ using System.Reflection; using log4net; using Nini.Config; using OpenSim.Region.Environment.Interfaces; -//TODO: Why do we reference InstantMessageModule here? using OpenSim.Region.Environment.Modules.Agent.AssetTransaction; using OpenSim.Region.Environment.Modules.Avatar.Chat; using OpenSim.Region.Environment.Modules.Avatar.InstantMessage; @@ -40,6 +39,7 @@ using OpenSim.Region.Environment.Modules.Scripting.DynamicTexture; using OpenSim.Region.Environment.Modules.Scripting.LoadImageURL; using OpenSim.Region.Environment.Modules.Scripting.XMLRPC; using OpenSim.Region.Environment.Scenes; +//TODO: Why do we reference InstantMessageModule here? namespace OpenSim.Region.Environment { diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 27967bc853..91bbdb7c77 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Net; using System.Reflection; +using System.Threading; using libsecondlife; using log4net; using OpenSim.Framework; @@ -580,7 +581,7 @@ namespace OpenSim.Region.Environment.Scenes avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath); avatar.MakeChildAgent(); - System.Threading.Thread.Sleep(5000); + Thread.Sleep(5000); avatar.CrossAttachmentsIntoNewRegion(regionHandle); if (KillObject != null) { diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 5164d30e04..e53cfaa7ce 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -30,7 +30,6 @@ using System.Collections.Generic; using System.Drawing; using System.IO; using System.Xml; -using System.Xml.Serialization; using Axiom.Math; using libsecondlife; using libsecondlife.Packets; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 5f9117645a..18cae485c5 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -26,7 +26,6 @@ */ using System; -using System.Collections; using System.Collections.Generic; using System.Drawing; using System.Runtime.Serialization; diff --git a/OpenSim/Region/Environment/Scenes/UndoState.cs b/OpenSim/Region/Environment/Scenes/UndoState.cs index 65c8669c6e..daabd8d829 100644 --- a/OpenSim/Region/Environment/Scenes/UndoState.cs +++ b/OpenSim/Region/Environment/Scenes/UndoState.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; using libsecondlife; namespace OpenSim.Region.Environment.Scenes diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 0773253e46..31ca3f32bb 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -3074,7 +3074,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return Convert.ToInt32(src.Data[index]); } - catch (System.FormatException e) + catch (FormatException e) { return 0; } @@ -3109,7 +3109,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return Convert.ToDouble(src.Data[index]); } - catch (System.FormatException e) + catch (FormatException e) { return 0.0; } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 261f8621e8..77a4048687 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -28,7 +28,6 @@ using System; using libsecondlife; using OpenSim.Framework; -using OpenSim.Region.Environment; using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; using OpenSim.Region.Environment.Scenes; diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 458bd4cb0f..3e9fc65f34 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs @@ -27,7 +27,9 @@ using System; using System.Collections; +using System.Reflection; using System.Threading; +using log4net; using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase @@ -38,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public class MaintenanceThread : iScriptEngineFunctionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); //public ScriptEngine m_ScriptEngine; private int MaintenanceLoopms; @@ -216,7 +218,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase //} } } - catch(System.Threading.ThreadAbortException ex) + catch(ThreadAbortException ex) { m_log.Error("Thread aborted in MaintenanceLoopThread. If this is during shutdown, please ignore"); }