From: Stephen Toub Date: Sat, 14 Sep 2019 02:30:37 +0000 (-0400) Subject: Remove unnecessary passing of RegexOptions.None to Regex ctor (dotnet/corefx#41101) X-Git-Tag: submit/tizen/20210909.063632~11031^2~465 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c7e6baf55ad32630634dfc402f8d6012dcd5a21;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove unnecessary passing of RegexOptions.None to Regex ctor (dotnet/corefx#41101) Commit migrated from https://github.com/dotnet/corefx/commit/f07730eedb1f7e2cb5e178d988bc2255f7ce7021 --- diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs index 155ac27..03ffab9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs @@ -364,7 +364,7 @@ namespace System.Xml.Schema _regStr.Insert(0, "("); _regStr.Append(")"); } - _derivedRestriction.Patterns.Add(new Regex(Preprocess(_regStr.ToString()), RegexOptions.None)); + _derivedRestriction.Patterns.Add(new Regex(Preprocess(_regStr.ToString()))); } catch (Exception e) { @@ -1348,7 +1348,7 @@ namespace System.Xml.Schema { if (s_languagePattern == null) { - Regex langRegex = new Regex("^([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*$", RegexOptions.None); + Regex langRegex = new Regex("^([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*$"); Interlocked.CompareExchange(ref s_languagePattern, langRegex, null); } return s_languagePattern; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateMisc.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateMisc.cs index a8dc973..27bf7be 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateMisc.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateMisc.cs @@ -1093,7 +1093,7 @@ namespace System.Xml.Tests { Initialize(); - Regex regex = new Regex(@"^\w+$", RegexOptions.None); + Regex regex = new Regex(@"^\w+$"); string schemaContent = @"