java regexp inline modifier in dsl causes java.lang.IndexOutOfBoundsException
-----------------------------------------------------------------------------
Key: JBRULES-2399
URL:
https://jira.jboss.org/jira/browse/JBRULES-2399
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.1.FINAL
Environment: Windows XP, Eclipse 3.4 with Drools 5.0.1 plugin
Reporter: Lev Kochubeevsky
Assignee: Mark Proctor
Does Drools 5 support java regexp inline modifiers? I tested my pattern matching in java
and it works fine:
System.out.println (
Pattern.matches("(?i)update the message",
"uPdAte the message")); // true
I'm trying to use the same thing in DSL:
[then](?i)update the message fact=update ( m );
DSLR:
update the message fact
and get:
java.lang.IndexOutOfBoundsException: No group 3
at java.util.regex.Matcher.group(Matcher.java:470)
at java.util.regex.Matcher.appendReplacement(Matcher.java:737)
at java.util.regex.Matcher.replaceAll(Matcher.java:813)
at org.drools.lang.dsl.DefaultExpander.expandRHS(DefaultExpander.java:305)
at org.drools.lang.dsl.DefaultExpander.expandConstructions(DefaultExpander.java:145)
at org.drools.lang.dsl.DefaultExpander.expand(DefaultExpander.java:116)
at org.drools.compiler.DrlParser.parse(DrlParser.java:125)
at org.drools.eclipse.DroolsEclipsePlugin.generateParsedResource(Unknown Source)
at org.drools.eclipse.DroolsEclipsePlugin.generateParsedResource(Unknown Source)
at org.drools.eclipse.DroolsEclipsePlugin.parseResource(Unknown Source)
at org.drools.eclipse.view.rules.RulesView.updateResource(Unknown Source)
at org.drools.eclipse.view.rules.RulesView.access$1(Unknown Source)
at org.drools.eclipse.view.rules.RulesView$1.visit(Unknown Source)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
at org.drools.eclipse.view.rules.RulesView.resourceChanged(Unknown Source)
at
org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:288)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:282)
at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:148)
at
org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:313)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1022)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:153)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira