| Summary: | [formatter] Formatting Javascript throws ArrayIndexOutOfBoundsException | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Florian Lasinger <florian> | ||||||
| Component: | General | Assignee: | Chris Jaun <cmjaun> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cmjaun, Olivier_Thomann | ||||||
| Version: | unspecified | Flags: | thatnitind:
review+
|
||||||
| Target Milestone: | 3.2.5 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Florian Lasinger
Created attachment 186746 [details]
Javascript Testcase - formatting fails
Moving to jsdt. Smaller block of code that produces same error:
function attachConfirmWindow(selector) {
$element.each(function() {
$(this).click(function() {
})
})
$('#confirm-button').click(function() {
this.setAttribute('disabled', 'disabled');
attachConfirmWindow('#button1');
});
Created attachment 198852 [details]
patch
Just moved the call to get raw source below the check that we have the correct token. In this case were were at the EOF because of the syntax error in the code. This should prevent us from trying to read in a token at the EOF. Applied for 3.2.5 and HEAD. Thank you for the test case, Florian. |