remove some useless NULL arguments

This commit is contained in:
UbitUmarov
2019-10-22 12:23:19 +01:00
parent d838a7e5c7
commit b98ad6c53c
11 changed files with 51 additions and 63 deletions

View File

@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Console
{
if (File.Exists(path))
{
console.Output("File {0} already exists. Please move or remove it.", null, path);
console.Output("File {0} already exists. Please move or remove it.", path);
return false;
}
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console
if (!UUID.TryParse(rawUuid, out uuid))
{
if (console != null)
console.Output("ERROR: {0} is not a valid uuid", null, rawUuid);
console.Output("ERROR: {0} is not a valid uuid", rawUuid);
return false;
}
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Console
if (!uint.TryParse(rawLocalId, out localId))
{
if (console != null)
console.Output("ERROR: {0} is not a valid local id", null, localId);
console.Output("ERROR: {0} is not a valid local id", localId);
return false;
}
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Console
if (localId == 0)
{
if (console != null)
console.Output("ERROR: {0} is not a valid local id - it must be greater than 0", null, localId);
console.Output("ERROR: {0} is not a valid local id - it must be greater than 0", localId);
return false;
}
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Console
}
if (console != null)
console.Output("ERROR: {0} is not a valid UUID or local id", null, rawId);
console.Output("ERROR: {0} is not a valid UUID or local id", rawId);
return false;
}
@@ -167,7 +167,7 @@ namespace OpenSim.Framework.Console
if (!bool.TryParse(rawConsoleString, out b))
{
if (console != null)
console.Output("ERROR: {0} is not a true or false value", null, rawConsoleString);
console.Output("ERROR: {0} is not a true or false value", rawConsoleString);
return false;
}
@@ -187,7 +187,7 @@ namespace OpenSim.Framework.Console
if (!int.TryParse(rawConsoleInt, out i))
{
if (console != null)
console.Output("ERROR: {0} is not a valid integer", null, rawConsoleInt);
console.Output("ERROR: {0} is not a valid integer", rawConsoleInt);
return false;
}
@@ -207,7 +207,7 @@ namespace OpenSim.Framework.Console
if (!float.TryParse(rawConsoleInput, out i))
{
if (console != null)
console.Output("ERROR: {0} is not a valid float", null, rawConsoleInput);
console.Output("ERROR: {0} is not a valid float", rawConsoleInput);
return false;
}
@@ -227,7 +227,7 @@ namespace OpenSim.Framework.Console
if (!double.TryParse(rawConsoleInput, out i))
{
if (console != null)
console.Output("ERROR: {0} is not a valid double", null, rawConsoleInput);
console.Output("ERROR: {0} is not a valid double", rawConsoleInput);
return false;
}
@@ -249,7 +249,7 @@ namespace OpenSim.Framework.Console
if (i < 0)
{
if (console != null)
console.Output("ERROR: {0} is not a positive integer", null, rawConsoleInt);
console.Output("ERROR: {0} is not a positive integer", rawConsoleInt);
return false;
}

View File

@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Monitoring
con.Output("check categories available are:");
foreach (string category in RegisteredChecks.Keys)
con.Output(" {0}", null, category);
con.Output(" {0}", category);
}
// else
// {

View File

@@ -79,7 +79,7 @@ namespace OpenSim.Framework.Monitoring
if (cmd[2] == "start")
{
Start();
con.Output("Now recording all stats to file every {0}ms", null, m_statsLogIntervalMs);
con.Output("Now recording all stats to file every {0}ms", m_statsLogIntervalMs);
}
else if (cmd[2] == "stop")
{
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Monitoring
sw.WriteLine(line);
}
MainConsole.Instance.Output("Stats saved to file {0}", null, path);
MainConsole.Instance.Output("Stats saved to file {0}", path);
}
public static void Start()

View File

@@ -117,7 +117,7 @@ namespace OpenSim.Framework.Monitoring
{
con.Output("Statistic categories available are:");
foreach (string category in RegisteredStats.Keys)
con.Output(" {0}", null, category);
con.Output(" {0}", category);
}
else
{

View File

@@ -224,14 +224,14 @@ namespace OpenSim.Framework.Monitoring
}
else if (subCommand == "status")
{
MainConsole.Instance.Output("Job engine running: {0}", null, JobEngine.IsRunning);
MainConsole.Instance.Output("Job engine running: {0}", JobEngine.IsRunning);
JobEngine.Job job = JobEngine.CurrentJob;
MainConsole.Instance.Output("Current job {0}", null, job != null ? job.Name : "none");
MainConsole.Instance.Output("Current job {0}", job != null ? job.Name : "none");
MainConsole.Instance.Output(
"Jobs waiting: {0}", null, JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
MainConsole.Instance.Output("Log Level: {0}", null, JobEngine.LogLevel);
"Jobs waiting: {0}", JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
MainConsole.Instance.Output("Log Level: {0}", JobEngine.LogLevel);
}
else if (subCommand == "log")
{
@@ -246,12 +246,12 @@ namespace OpenSim.Framework.Monitoring
// if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel))
// {
JobEngine.LogLevel = logLevel;
MainConsole.Instance.Output("Set debug log level to {0}", null, JobEngine.LogLevel);
MainConsole.Instance.Output("Set debug log level to {0}", JobEngine.LogLevel);
// }
}
else
{
MainConsole.Instance.Output("Unrecognized job engine subcommand {0}", null, subCommand);
MainConsole.Instance.Output("Unrecognized job engine subcommand {0}", subCommand);
}
}
}

View File

@@ -129,7 +129,7 @@ namespace OpenSim.Framework
}
Addin addin = addins[ndx];
MainConsole.Instance.Output("Uninstalling plugin {0}", null, addin.Id);
MainConsole.Instance.Output("Uninstalling plugin {0}", addin.Id);
AddinManager.Registry.DisableAddin(addin.Id);
addin.Enabled = false;
IProgressStatus ps = new ConsoleProgressStatus(false);
@@ -487,7 +487,7 @@ namespace OpenSim.Framework
}
else
{
MainConsole.Instance.Output("Not Enabled in this domain {0}", null, addin.Name);
MainConsole.Instance.Output("Not Enabled in this domain {0}", addin.Name);
}
return;
}
@@ -503,7 +503,7 @@ namespace OpenSim.Framework
foreach (Addin addin in addins)
{
MainConsole.Instance.Output("Addin {0}", null, addin.Name);
MainConsole.Instance.Output("Addin {0}", addin.Name);
}
}

View File

@@ -192,7 +192,7 @@ namespace OpenSim.Framework.Servers
if (!int.TryParse(rawNewDebug, out newDebug))
{
MainConsole.Instance.Output("{0} is not a valid debug level", null, rawNewDebug);
MainConsole.Instance.Output("{0} is not a valid debug level", rawNewDebug);
return;
}
@@ -205,22 +205,22 @@ namespace OpenSim.Framework.Servers
if (allReqs || inReqs)
{
MainServer.DebugLevel = newDebug;
MainConsole.Instance.Output("IN debug level set to {0}", null, newDebug);
MainConsole.Instance.Output("IN debug level set to {0}", newDebug);
}
if (allReqs || outReqs)
{
WebUtil.DebugLevel = newDebug;
MainConsole.Instance.Output("OUT debug level set to {0}", null, newDebug);
MainConsole.Instance.Output("OUT debug level set to {0}", newDebug);
}
}
else
{
if (allReqs || inReqs)
MainConsole.Instance.Output("Current IN debug level is {0}", null, DebugLevel);
MainConsole.Instance.Output("Current IN debug level is {0}", DebugLevel);
if (allReqs || outReqs)
MainConsole.Instance.Output("Current OUT debug level is {0}", null, WebUtil.DebugLevel);
MainConsole.Instance.Output("Current OUT debug level is {0}", WebUtil.DebugLevel);
}
}

View File

@@ -492,7 +492,7 @@ namespace OpenSim.Framework.Servers
if (!int.TryParse(rawLevel, out newLevel))
{
MainConsole.Instance.Output("{0} is not a valid debug level", null, rawLevel);
MainConsole.Instance.Output("{0} is not a valid debug level", rawLevel);
return;
}
@@ -503,7 +503,7 @@ namespace OpenSim.Framework.Servers
}
Util.LogThreadPool = newLevel;
MainConsole.Instance.Output("LogThreadPool set to {0}", null, newLevel);
MainConsole.Instance.Output("LogThreadPool set to {0}", newLevel);
}
private void HandleForceGc(string module, string[] args)
@@ -991,9 +991,9 @@ namespace OpenSim.Framework.Servers
}
if (Watchdog.AbortThread(threadId))
MainConsole.Instance.Output("Aborted thread with id {0}", null, threadId);
MainConsole.Instance.Output("Aborted thread with id {0}", threadId);
else
MainConsole.Instance.Output("ERROR - Thread with id {0} not found in managed threads", null, threadId);
MainConsole.Instance.Output("ERROR - Thread with id {0} not found in managed threads", threadId);
}
/// <summary>
@@ -1020,7 +1020,7 @@ namespace OpenSim.Framework.Servers
protected void Notice(string format, params object[] components)
{
if (m_console != null)
m_console.Output(format, null, components);
m_console.Output(format, components);
}
public virtual void Shutdown()