[MGNLDIFF-15] java.lang.IndexOutOfBoundsException When Content Contains Dollar Sign ($) Created: 16/Apr/12 Updated: 14/Dec/12 Resolved: 17/Apr/12 |
|
| Status: | Closed |
| Project: | Magnolia Diff Module |
| Component/s: | None |
| Affects Version/s: | 1.0.3, 1.1, 1.1.1 |
| Fix Version/s: | 1.0.4, 1.1.2 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Adam Galloway | Assignee: | Ondrej Chytil |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Magnolia 4.4.4 and Magnolia 4.5 |
||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Description |
|
When using "Compare with previous" link in the "Edit Workitem" dialog an error is thrown stating: java.lang.IndexOutOfBoundsException: No group 6 This is appears to be related to there being a $ dollar sign in the content of the versions being compared. Removing the dollar sign allows comparison page to render. The stack trace is (for version 1.0.3, similar but different exception in newer version): java.lang.IndexOutOfBoundsException: No group 6 Additional Info: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6325587 Steps to reproduce: Go to http://demo.magnolia-cms.com |
| Comments |
| Comment by Adam Galloway [ 16/Apr/12 ] |
|
Attached a simple patch that uses sub strings instead of regex to build response html. Also removed duplicate doctype that gets injected into the body of the response html for the comparison. |
| Comment by Jan Haderka [ 16/Apr/12 ] |
|
Thanks Adam. Going to include it in the next release. |
| Comment by Adam Galloway [ 17/Apr/12 ] |
|
Just realized that the previous patch excludes attributes on the body tag. Attaching an updated patch that takes care of that. |
| Comment by Ondrej Chytil [ 17/Apr/12 ] |
|
Thanks for patch Adam. |