Bug 724771 (BRMS-609)
| Summary: | Could not parse escaped characters | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Tomas Schlosser <tschloss> |
| Component: | unspecified | Assignee: | Edson Tirelli <ed.tirelli> |
| Status: | CLOSED WONTFIX | QA Contact: | Tomas Schlosser <tschloss> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | BRMS 5.2.0-Dev1 | CC: | atangrin, etirelli, lcarlon, lpetrovi |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | BRMS 5.2.0.GA | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/BRMS-609 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
In previous versions of BRMS it was possible to use single escape characters in strings, this behavior was maintained in previous 5.x versions for backwards compatibility, however, the use of single escape characters for strings has been deprecated and it is now necessary to use double escape characters in BRMS 5.2.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-07-29 13:52:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Tomas Schlosser
2011-06-24 07:15:22 UTC
Link: Added: This issue depends JBRULES-2992 The use of single escapes for regex was deprecated in the 5.0 community version and maintained just for backward compatibility with 4.x during 2 years. With the parser rewrite in the 5.2 community version, we thought it was time to remove that and handle escapes the 5.x way (i.e., like in java) with double escapes. I am closing this ticket, but if there is a reason to still support single escapes for regex, feel free to reopen this ticket and let us know and we might consider reimplementing the processStringScapes. Release Notes Docs Status: Added: Not Yet Documented BRMS Reference Guide states "In contrast to Java, escapes are not needed within regular expressions written as string literals." Only other references to this are in release notes for BRMS 5.0.1 and 5.1.0 stating that ProcessStringEscapesOption was added. There is no warning about deprecation. Therefore I'm reopening the bug and would like PM to decide about it on next triage meeting. Ok, let us know. It is possible that the documentation is not accurate, but the default option for 5.x was to process string escapes like java, obviously requiring double \\ when the \ is to be used as a literal.
It is important to understand that the effect of disabling escape processing affects all strings in all rules, not only regexps. So if one disables it to work like it was in Drools 4, it makes impossible to use special characters in strings everywhere. For instance:
Header( content == "foo\n" )
The above is a string with 5 characters ('f' 'o' 'o' '\' 'n') and not what was probably the intent 3 characters + line feed ('f' 'o' 'o' <linefeed>).
This limitation was the reason we moved away from it when we released Drools 5.0.
We will need to release note this, as it was never meant to work in 5.x.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Need release notes.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Diffed Contents:
@@ -1 +1,3 @@
-Need release notes.+https://bugzilla.redhat.com/show_bug.cgi?id=724771
+
+The use of single escape characters for strings has been deprecated. In previous versions of BRMS it was possible to use single escape characters in strings, this behavior was maintained in previous 5.x versions for backwards compatibility, however it is necessary to use double escape characters in BRMS 5.2 as this is no longer supported.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Diffed Contents:
@@ -1,3 +1 @@
-https://bugzilla.redhat.com/show_bug.cgi?id=724771
-
The use of single escape characters for strings has been deprecated. In previous versions of BRMS it was possible to use single escape characters in strings, this behavior was maintained in previous 5.x versions for backwards compatibility, however it is necessary to use double escape characters in BRMS 5.2 as this is no longer supported.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Diffed Contents:
@@ -1 +1 @@
-The use of single escape characters for strings has been deprecated. In previous versions of BRMS it was possible to use single escape characters in strings, this behavior was maintained in previous 5.x versions for backwards compatibility, however it is necessary to use double escape characters in BRMS 5.2 as this is no longer supported.+In previous versions of BRMS it was possible to use single escape characters in strings, this behavior was maintained in previous 5.x versions for backwards compatibility, however, the use of single escape characters for strings has been deprecated and it is now necessary to use double escape characters in BRMS 5.2.
|