Author: brett Date: Wed Mar 21 04:33:34 2012 New Revision: 1303279 URL: http://svn.apache.org/viewvc?rev=1303279&view=rev Log: [NPANDAY-554] POM generator can fail on incorrect match from GAC. Correct regex to not match partial assembly names
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/GacUtility.cs Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/GacUtility.cs URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/GacUtility.cs?rev=1303279&r1=1303278&r2=1303279&view=diff ============================================================================== --- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/GacUtility.cs (original) +++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/GacUtility.cs Wed Mar 21 04:33:34 2012 @@ -199,12 +199,12 @@ namespace NPanday.Utils Regex regex; if (string.IsNullOrEmpty(version)) { - regex = new Regex(@"\s*" + assemblyName + @",.*processorArchitecture=" + architecture + ".*", RegexOptions.IgnoreCase); + regex = new Regex(@"\s+" + assemblyName + @",.*processorArchitecture=" + architecture + ".*", RegexOptions.IgnoreCase); } else { - regex = new Regex(@"\s*" + assemblyName + @",\s*Version=" + Regex.Escape(version) + @".*processorArchitecture=" + architecture + ".*", RegexOptions.IgnoreCase); + regex = new Regex(@"\s+" + assemblyName + @",\s*Version=" + Regex.Escape(version) + @".*processorArchitecture=" + architecture + ".*", RegexOptions.IgnoreCase); } MatchCollection matches = regex.Matches(gacs);