mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 17:02:10 -10:00
Fix for bug 9751. Regression on regular expressions should not be happened.
svn path=/trunk/mcs/; revision=94682
This commit is contained in:
1 parent
9d895cd2cd
commit
0368fce4da
1 file changed
+11
-20
@@ -28,19 +28,8 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
using RegularExpression = System.Text.RegularExpressions.Syntax.RegularExpression;
|
||||
using Parser = System.Text.RegularExpressions.Syntax.Parser;
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
|
||||
namespace System.Text.RegularExpressions
|
||||
{
|
||||
public partial class Regex : ISerializable
|
||||
@@ -70,7 +59,7 @@ namespace System.Text.RegularExpressions
|
||||
if (machineFactory is InterpreterFactory)
|
||||
return null;
|
||||
|
||||
return (JvmReMachine) ((JvmReMachineFactory) machineFactory).GetMachine ();
|
||||
return ((JvmReMachineFactory) machineFactory).GetMachine ();
|
||||
}
|
||||
|
||||
internal int GetJavaNumberByNetNumber (int netNumber) {
|
||||
@@ -95,20 +84,22 @@ namespace System.Text.RegularExpressions
|
||||
}
|
||||
|
||||
PatternData patternData = null;
|
||||
try
|
||||
{
|
||||
string errorMessage = null;
|
||||
try{
|
||||
patternData = PatternDataBuilder.GetPatternData(pattern, roptions);
|
||||
}catch(Exception e)
|
||||
{
|
||||
}catch(Exception e){
|
||||
#if DEBUG
|
||||
throw;
|
||||
#endif
|
||||
Console.WriteLine("Creating pattern on JVM failed for pattern " + pattern
|
||||
+ "\n" + e.Message);
|
||||
errorMessage = "Creating pattern on JVM failed for pattern " + pattern
|
||||
+ "\n" + e.Message;
|
||||
}
|
||||
|
||||
if (patternData == null)
|
||||
InitNewRegex ();
|
||||
if (patternData == null){
|
||||
InitNewRegex();
|
||||
if (errorMessage != null)
|
||||
Console.WriteLine (errorMessage);
|
||||
}
|
||||
else
|
||||
InitJvmRegex (patternData);
|
||||
|
||||
|
||||
Reference in new issue
Block a user