From e14cb45b9bc4c78300cb804833cb66c1c2e62187 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 24 Oct 2011 23:26:41 +0100 Subject: Drop some unnecessary ContainsKey() checking before Remove() in BaseHttpServer() Remove() presumably does this check anyway since it just returns false if the key is not in the collection. --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 7ec813f..3aed9a8 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -1814,12 +1814,7 @@ namespace OpenSim.Framework.Servers.HttpServer public void RemovePollServiceHTTPHandler(string httpMethod, string path) { lock (m_pollHandlers) - { - if (m_pollHandlers.ContainsKey(path)) - { - m_pollHandlers.Remove(path); - } - } + m_pollHandlers.Remove(path); RemoveHTTPHandler(httpMethod, path); } @@ -1843,12 +1838,7 @@ namespace OpenSim.Framework.Servers.HttpServer public void RemoveXmlRPCHandler(string method) { lock (m_rpcHandlers) - { - if (m_rpcHandlers.ContainsKey(method)) - { - m_rpcHandlers.Remove(method); - } - } + m_rpcHandlers.Remove(method); } public bool RemoveLLSDHandler(string path, LLSDMethod handler) -- cgit v1.1