diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Tests/UtilTest.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index c5a20e7..1ca35df 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs | |||
@@ -146,9 +146,9 @@ namespace OpenSim.Framework.Tests | |||
146 | Assert.IsFalse(Util.isUUID("FOOBAR67-89ab-Cdef-0123-456789AbCdEf"), | 146 | Assert.IsFalse(Util.isUUID("FOOBAR67-89ab-Cdef-0123-456789AbCdEf"), |
147 | "UUIDs with non-hex characters are recognized as correct UUIDs."); | 147 | "UUIDs with non-hex characters are recognized as correct UUIDs."); |
148 | Assert.IsFalse(Util.isUUID("01234567"), | 148 | Assert.IsFalse(Util.isUUID("01234567"), |
149 | "Too short UUIDs are regognized as correct UUIDs."); | 149 | "Too short UUIDs are recognized as correct UUIDs."); |
150 | Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123-456789AbCdEf0"), | 150 | Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123-456789AbCdEf0"), |
151 | "Too long UUIDs are regognized as correct UUIDs."); | 151 | "Too long UUIDs are recognized as correct UUIDs."); |
152 | Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123+456789AbCdEf"), | 152 | Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123+456789AbCdEf"), |
153 | "UUIDs with wrong format are recognized as correct UUIDs."); | 153 | "UUIDs with wrong format are recognized as correct UUIDs."); |
154 | } | 154 | } |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 1cbb53f..0b2fbb9 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -46,7 +46,6 @@ using System.Threading; | |||
46 | using log4net; | 46 | using log4net; |
47 | using Nini.Config; | 47 | using Nini.Config; |
48 | using Nwc.XmlRpc; | 48 | using Nwc.XmlRpc; |
49 | // using BclExtras; | ||
50 | using OpenMetaverse; | 49 | using OpenMetaverse; |
51 | using OpenMetaverse.StructuredData; | 50 | using OpenMetaverse.StructuredData; |
52 | using Amib.Threading; | 51 | using Amib.Threading; |
@@ -91,8 +90,10 @@ namespace OpenSim.Framework | |||
91 | private static readonly DateTime unixEpoch = | 90 | private static readonly DateTime unixEpoch = |
92 | DateTime.ParseExact("1970-01-01 00:00:00 +0", "yyyy-MM-dd hh:mm:ss z", DateTimeFormatInfo.InvariantInfo).ToUniversalTime(); | 91 | DateTime.ParseExact("1970-01-01 00:00:00 +0", "yyyy-MM-dd hh:mm:ss z", DateTimeFormatInfo.InvariantInfo).ToUniversalTime(); |
93 | 92 | ||
94 | public static readonly Regex UUIDPattern | 93 | private static readonly string rawUUIDPattern |
95 | = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); | 94 | = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"; |
95 | public static readonly Regex PermissiveUUIDPattern = new Regex(rawUUIDPattern); | ||
96 | public static readonly Regex UUIDPattern = new Regex(string.Format("^{0}$", rawUUIDPattern)); | ||
96 | 97 | ||
97 | public static FireAndForgetMethod DefaultFireAndForgetMethod = FireAndForgetMethod.SmartThreadPool; | 98 | public static FireAndForgetMethod DefaultFireAndForgetMethod = FireAndForgetMethod.SmartThreadPool; |
98 | public static FireAndForgetMethod FireAndForgetMethod = DefaultFireAndForgetMethod; | 99 | public static FireAndForgetMethod FireAndForgetMethod = DefaultFireAndForgetMethod; |