LFL)
{
LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList();
foreach (FriendListItem fl in LFL)
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index 91284e8..b0b7b1e 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications
///
/// string to be examined
/// true if slash is present
- private bool isSlashed(string s)
+ private static bool isSlashed(string s)
{
return s.Substring(s.Length - 1, 1) == "/";
}
@@ -196,7 +196,7 @@ namespace OpenSim.Framework.Communications
sb.Append("&");
sb.Append(kv.Key);
- if (kv.Value != null && kv.Value.Length != 0)
+ if (!string.IsNullOrEmpty(kv.Value))
{
sb.Append("=");
sb.Append(kv.Value);
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs
index 91b87a5..b452794 100644
--- a/OpenSim/Framework/ConfigurationMember.cs
+++ b/OpenSim/Framework/ConfigurationMember.cs
@@ -472,7 +472,7 @@ namespace OpenSim.Framework
}
}
- private IGenericConfig LoadConfigDll(string dllName)
+ private static IGenericConfig LoadConfigDll(string dllName)
{
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
IGenericConfig plug = null;
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 0b22d0e..b336545 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Console
///
/// arbitrary string for input
/// an ansii color
- private ConsoleColor DeriveColor(string input)
+ private static ConsoleColor DeriveColor(string input)
{
int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
return (ConsoleColor) colIdx;
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs
index 86df3c0..d381179 100644
--- a/OpenSim/Framework/Console/OpenSimAppender.cs
+++ b/OpenSim/Framework/Console/OpenSimAppender.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Framework.Console
}
}
- private ConsoleColor DeriveColor(string input)
+ private static ConsoleColor DeriveColor(string input)
{
int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
return (ConsoleColor) colIdx;
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs
index be56cdc..5eac9de 100644
--- a/OpenSim/Framework/PacketPool.cs
+++ b/OpenSim/Framework/PacketPool.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Framework
public Packet GetPacket(PacketType type)
{
- Packet packet = null;
+ Packet packet;
lock (pool)
{
@@ -109,7 +109,7 @@ namespace OpenSim.Framework
}
// private byte[] decoded_header = new byte[10];
- private PacketType GetType(byte[] bytes)
+ private static PacketType GetType(byte[] bytes)
{
byte[] decoded_header = new byte[10 + 8];
ushort id;
diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs
index 7f18221..cb0911e 100644
--- a/OpenSim/Framework/Remoting.cs
+++ b/OpenSim/Framework/Remoting.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Framework
/// A
/// B
/// C
- private byte[] AppendArrays(byte[] a, byte[] b)
+ private static byte[] AppendArrays(byte[] a, byte[] b)
{
byte[] c = new byte[a.Length + b.Length];
Buffer.BlockCopy(a, 0, c, 0, a.Length);
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 7c268ed..088d944 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -496,7 +496,7 @@ namespace OpenSim.Framework.Servers
}
}
- private void DoHTTPGruntWork(Hashtable responsedata, HttpListenerResponse response)
+ private static void DoHTTPGruntWork(Hashtable responsedata, HttpListenerResponse response)
{
int responsecode = (int)responsedata["int_response_code"];
string responseString = (string)responsedata["str_response_string"];
@@ -505,7 +505,7 @@ namespace OpenSim.Framework.Servers
//Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
//and should check for NullReferenceExceptions
- if (contentType == null || contentType == "")
+ if (string.IsNullOrEmpty(contentType))
{
contentType = "text/html";
}
@@ -677,12 +677,12 @@ namespace OpenSim.Framework.Servers
}
// Fallback HTTP responses in case the HTTP error response files don't exist
- private string getDefaultHTTP404(string host)
+ private static string getDefaultHTTP404(string host)
{
return "404 Page not found
Ooops!
The page you requested has been obsconded with by knomes. Find hippos quick!
If you are trying to log-in, your link parameters should have: "-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/" in your link
";
}
- private string getDefaultHTTP500()
+ private static string getDefaultHTTP500()
{
return "500 Internal Server Error
Ooops!
The server you requested is overun by knomes! Find hippos quick!
";
}
diff --git a/OpenSim/Framework/Servers/BinaryStreamHandler.cs b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
index bfa3bd5..dcd1cba 100644
--- a/OpenSim/Framework/Servers/BinaryStreamHandler.cs
+++ b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers
m_method = binaryMethod;
}
- private byte[] ReadFully(Stream stream)
+ private static byte[] ReadFully(Stream stream)
{
byte[] buffer = new byte[32768];
using (MemoryStream ms = new MemoryStream())
--
cgit v1.1