| Summary: | StackOverFlowError happens with JSPTokenizer when I paste many JSP comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | hoshiura <hoshiura> | ||||||||||
| Component: | jst.jsp | Assignee: | Nitin Dahyabhai <thatnitind> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | David Williams <david_williams> | ||||||||||
| Severity: | critical | ||||||||||||
| Priority: | P1 | CC: | david_williams, jeffliu, patric, uchi | ||||||||||
| Version: | 1.5 | ||||||||||||
| Target Milestone: | 1.5 RC5 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | PMC_approved | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
hoshiura
If the fix for this isn't obvious, we should revert the fix for bug 98258 for RC4 since this is worse that original problem. Hoshiura-san, if you have time and ability, it would be great to have a "headless" JUnit test that demonstrated the problem. Created attachment 42854 [details]
A JUnit test case in org.eclipse.jst.jsp.core.tests plugin
Hi, I attached a JUnit test case to reproduce StackOverFlowError. The patch contains a test case file and a test data.
Created attachment 42915 [details]
updated test for inclusion in our BVT
Created attachment 42916 [details]
proposed changes for JSPTokenizer
Thank you for the original Unit Test. I've modified it so it can be added easily to our BVT and used it to track down the problem. When a JSP comment exists in a standalone area, we were pushing the current state onto a stack to return to it after parsing the full comment. The error was that the state was pushed at all--not being within a tag meant no state stack usage or other adjustment was needed. The patch simply removes the pushing onto the stack and uses the current state (instead of the now-newest entry on the stack) to help decide what to do next.
The attached unit test(s) and existing unit test suites pass with the patch. CCing David for review. Nitin, approved. As we discussed, the "peek" in original code was done in error. Please smoke test well :) but, let's put in RC4. please release. +1 *** Bug 144807 has been marked as a duplicate of this bug. *** +1 for WTP 1.5 RC5. Use the new PMC approval process. +1 for RC5 If it is good for David it is good for me - he should definitely know this one :-) Released for 1.5 RC5 Created attachment 43416 [details]
patched jar to fix this problem
I kept getting a lot of these errors, just do to JSP indexing etc., using
RC4 as my self hosting environment. This might just be because I have lots of "goofy" JSP's in my workspace for testing ... but, if others encounter this problem, you can try this "developer built" plugin, until RC5 comes out.
You chould just be able to copy this into your plugins directory (and restart with -clean) .. no need to delete the old, bcause I make version number compatible.
I verified this with RC6. |