| Summary: | JSP parser fails parsing erroneous jsp directives | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Patric Rufflar <patric> | ||||
| Component: | jst.jsp | Assignee: | Ian Tewksbury <itewksbu> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||
| Severity: | major | ||||||
| Priority: | P2 | CC: | itewksbu, keith.treague, nsand.dev, patric | ||||
| Version: | 1.5 | Keywords: | helpwanted | ||||
| Target Milestone: | 3.2 M2 | Flags: | nsand.dev:
review+
|
||||
| Hardware: | PC | ||||||
| OS: | Windows 2000 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Patric Rufflar
Increasing severity since we're losing/dropping user data here. There's a "hole" in the structured document at the position that the partitioner is trying to access. Changing severity back to the original "major" and lowering priority. As an edge case, well keep looking at it but I'm not sure we'll have a fix in time for 1.5. This is not occurring in WTP 3.2 (In reply to comment #3) > This is not occurring in WTP 3.2 > Sorry, I meant it is not occurring in 3.1-20090616035105 My last test of this must have been mistaken this error is still being logged using 3.2I-20090818_003224, I will investigate further. Created attachment 144827 [details]
Fix Patch
The issue here was that when the JSPSourceParser found an UNDEFINED region and the previous region was also UNDEFINED it would extend the previous UNDEFINED region to include the new UNDEFINED region, but if that previous region was a ITextRegionContainer it should also add the new region as a child region of the container and update the new regions start accordingly. Because that was not being done the new appended UNDEFINED regions length was added to the container but not the region itself, so when the region at the extra length is requested it null pointers.
This patch adds in the necessary checks and updates to deal with this situation.
The patch looks good to me. |